diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-03-10 21:19:01 +0100 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-04-28 20:02:30 +0200 |
commit | 60a584cfab19d6c671b4aeebf32d0b36a4bc1b77 (patch) | |
tree | a366ca80f62769dc63845a9713606f328919ebba /test | |
parent | 0b79735b503cc0a35062799a8ac45f169f0af0f7 (diff) | |
download | unit-60a584cfab19d6c671b4aeebf32d0b36a4bc1b77.tar.gz unit-60a584cfab19d6c671b4aeebf32d0b36a4bc1b77.tar.bz2 |
Workarounded Clang bug triggered by Ruby.
Add -fdeclspec to NXT_RUBY_CFLAGS for Clang, if it's available.
Clang incorrectly reports 1 for __has_declspec_attribute(x) in
some cases, such as MacOS or Cygwin. That causes ruby code to
break. ruby added -fdeclspec to their CFLAGS in 2019 to
workaround this bug, since it enables __declspec() and therefore,
the compiler behavior matches what it reports.
Since we don't know what are all the architectures that trigger
the clang bug, let's add the flag for all of them (especially
since it should be harmless).
Add this workaround only at the time of configuring the ruby
module. This way we don't clutter the global NXT_CFLAGS with an
unnecessary flag.
Link: unit bug <https://github.com/nginx/unit/issues/653>
Link: ruby bug <https://bugs.ruby-lang.org/issues/18616>
Link: LLVM bug <https://github.com/llvm/llvm-project/issues/49958>
Commit: LLVM: Add -fdeclspec <d170c4b57a91adc74ca89c6d4af616a00323b12c>
Commit: ruby: Use -fdeclspec <0958e19ffb047781fe1506760c7cbd8d7fe74e57>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions