mirror of
https://github.com/rubyjs/libv8
synced 2023-03-27 23:21:48 -04:00
Add -Wno-unused-variable
flag to OS X clang flag
Without this flag, it's unable to compile libv8 on OS X 10.10 due to this error message: ruby ext/libv8/extconf.rb creating Makefile HEAD is now at 7ce3fe1... Version 3.16.14 Using existing [svn-remote "svn"] HEAD is now at f7bc250... Make gyp/win32 compatible with upstream ninja. Compiling v8 for x64 Using python 2.7.6 Using compiler: /usr/bin/c++ (clang version 5.1) ../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable] static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers); ^ 1 error generated. make[1]: *** [/Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o] Error 1 make: *** [x64.release] Error 2 GYP_GENERATORS=make \ build/gyp/gyp --generator-output="out" build/all.gyp \ -Ibuild/standalone.gypi --depth=. \ -Dv8_target_arch=x64 \ -S.x64 -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o This has been tested against this version of clang and OS X: $ g++ -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin14.0.0 Thread model: posix This should fix #123
This commit is contained in:
parent
9ff2eb02a4
commit
20093a74bf
2 changed files with 13 additions and 0 deletions
|
@ -18,6 +18,7 @@ module Libv8
|
||||||
when Compiler::Clang
|
when Compiler::Clang
|
||||||
patch_directories << 'clang'
|
patch_directories << 'clang'
|
||||||
patch_directories << 'clang33' if compiler.version >= '3.3'
|
patch_directories << 'clang33' if compiler.version >= '3.3'
|
||||||
|
patch_directories << 'clang51' if compiler.version >= '5.1'
|
||||||
end
|
end
|
||||||
|
|
||||||
patch_directories
|
patch_directories
|
||||||
|
|
12
patches/clang51/no-unused-variable.patch
Normal file
12
patches/clang51/no-unused-variable.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff --git a/build/standalone.gypi b/build/standalone.gypi
|
||||||
|
index 125c5bf..a283a28 100644
|
||||||
|
--- a/build/standalone.gypi
|
||||||
|
+++ b/build/standalone.gypi
|
||||||
|
@@ -210,6 +212,7 @@
|
||||||
|
'-Wendif-labels',
|
||||||
|
'-W',
|
||||||
|
'-Wno-unused-parameter',
|
||||||
|
+ '-Wno-unused-variable',
|
||||||
|
'-Wnon-virtual-dtor',
|
||||||
|
],
|
||||||
|
},
|
Loading…
Reference in a new issue