diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-12-02 14:58:43 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-12-26 20:45:12 +0900 |
commit | 0958e19ffb047781fe1506760c7cbd8d7fe74e57 (patch) | |
tree | ca20d9181667d746c6df55c63f595980e9a77fbc /configure.ac | |
parent | 863dbb21d8912c73e84fed47f2d3a1ac5d8275d4 (diff) | |
download | ruby-0958e19ffb047781fe1506760c7cbd8d7fe74e57.tar.gz |
add several __has_something macro
With these macros implemented we can write codes just like we can assume
the compiler being clang. MSC_VERSION_SINCE is defined to implement
those macros, but turned out to be handy for other places. The -fdeclspec
compiler flag is necessary for clang to properly handle __has_declspec().
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f1ed36bb96..f9e8573d45 100644 --- a/configure.ac +++ b/configure.ac @@ -481,6 +481,8 @@ AS_IF([test x"${RPATHFLAG}" = x], [ rpathflag=`echo "$RPATHFLAG" | sed 's/%.*//'` ]) +RUBY_TRY_CFLAGS(-fdeclspec, [RUBY_APPEND_OPTIONS(XCFLAGS, -fdeclspec)]) + AS_CASE([$RUBY_PATCHLEVEL], [-*], [RUBY_DEVEL=yes], [RUBY_DEVEL=no]) particular_werror_flags=$RUBY_DEVEL |