Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 14a128d

Browse files
author
Jb Aviat
committed
Add patch to allow build with clang 7.3
This adds the -Wno-shift-negative-value flag to Clang. Clang 7.3 was introduced in OSX with XCode 7.3. Without this flag, compiling with Clang 7.3 fails with errors such as: In file included from ../src/elements.h:32: ../src/objects.h:5252:44: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] static const int kElementsKindMask = (-1 << kElementsKindShift) & ~~ ^ ../src/objects.h:7386:36: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ 2 errors generated.
1 parent 78ee254 commit 14a128d

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

ext/libv8/patcher.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def patch_directories_for(compiler)
2020
patch_directories << 'clang33' if compiler.version >= '3.3'
2121
patch_directories << 'clang51' if compiler.version >= '5.1'
2222
patch_directories << 'clang70' if compiler.version >= '7.0'
23+
patch_directories << 'clang73' if compiler.version >= '7.3'
2324
end
2425

2526
patch_directories
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- a/build/standalone.gypi
2+
+++ b/build/standalone.gypi
3+
@@ -215,6 +215,7 @@
4+
'-Wno-unused-variable',
5+
'-Wno-unused-local-typedefs',
6+
'-Wno-tautological-undefined-compare',
7+
+ '-Wno-shift-negative-value',
8+
'-Wnon-virtual-dtor',
9+
],
10+
},

0 commit comments

Comments
 (0)