GeezerVison is showing github.com — build: harmonize Clang checks · nodejs/node@eed9674
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: common.gypi +3-4Lines changed: 3 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 107 | 107 | 'v8_base': '<(PRODUCT_DIR)/obj.target/tools/v8_gypfiles/libv8_snapshot.a', | 108 | 108 | }], | 109 | 109 | ['OS=="mac"', { | 110 | | - 'clang%': 1, | 111 | 110 | 'obj_dir%': '<(PRODUCT_DIR)/obj.target', | 112 | 111 | 'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a', | 113 | 112 | }], | | 182 | 181 | }, { | 183 | 182 | 'MSVC_runtimeType': 2 # MultiThreadedDLL (/MD) | 184 | 183 | }], | 185 | | - ['llvm_version=="0.0"', { | 186 | | - 'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ', # GCC | 187 | | - }, { | | 184 | + ['clang==1', { | 188 | 185 | 'lto': ' -flto ', # Clang | | 186 | + }, { | | 187 | + 'lto': ' -flto=4 -fuse-linker-plugin -ffat-lto-objects ', # GCC | 189 | 188 | }], | 190 | 189 | ], | 191 | 190 | }, | |
Collapse file Copy file name to clipboardExpand all lines: configure.py +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1042,6 +1042,7 @@ def get_gas_version(cc): | 1042 | 1042 | # quite prepared to go that far yet. | 1043 | 1043 | def check_compiler(o): | 1044 | 1044 | if sys.platform == 'win32': | | 1045 | + o['variables']['clang'] = 0 | 1045 | 1046 | o['variables']['llvm_version'] = '0.0' | 1046 | 1047 | if not options.openssl_no_asm and options.dest_cpu in ('x86', 'x64'): | 1047 | 1048 | nasm_version = get_nasm_version('nasm') | @@ -1051,6 +1052,7 @@ def check_compiler(o): | 1051 | 1052 | return | 1052 | 1053 |
| 1053 | 1054 | ok, is_clang, clang_version, gcc_version = try_check_compiler(CXX, 'c++') | | 1055 | + o['variables']['clang'] = B(is_clang) | 1054 | 1056 | version_str = ".".join(map(str, clang_version if is_clang else gcc_version)) | 1055 | 1057 | print_verbose(f"Detected {'clang ' if is_clang else ''}C++ compiler (CXX={CXX}) version: {version_str}") | 1056 | 1058 | if not ok: | |
Collapse file Copy file name to clipboardExpand all lines: deps/openssl/openssl_common.gypi +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 67 | 67 | 'TERMIOS', | 68 | 68 | ], | 69 | 69 | 'conditions': [ | 70 | | - [ 'llvm_version=="0.0"', { | | 70 | + [ 'clang==0', { | 71 | 71 | 'cflags': ['-Wno-old-style-declaration',], | 72 | 72 | }], | 73 | 73 | ], | |
Collapse file Copy file name to clipboardExpand all lines: deps/zlib/zlib.gyp +3-4Lines changed: 3 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | 'ZLIB_ROOT': '.', | 8 | 8 | 'use_system_zlib%': 0, | 9 | 9 | 'arm_fpu%': '', | 10 | | - 'llvm_version%': '0.0', | 11 | 10 | }, | 12 | 11 | 'conditions': [ | 13 | 12 | ['use_system_zlib==0', { | | 24 | 23 | },{ | 25 | 24 | 'defines': [ 'X86_NOT_WINDOWS' ], | 26 | 25 | }], | 27 | | - ['OS!="win" or llvm_version!="0.0"', { | | 26 | + ['OS!="win" or clang==1', { | 28 | 27 | 'cflags': [ '-mssse3' ], | 29 | 28 | 'xcode_settings': { | 30 | 29 | 'OTHER_CFLAGS': [ '-mssse3' ], | | 65 | 64 | 'conditions': [ | 66 | 65 | ['OS!="ios"', { | 67 | 66 | 'conditions': [ | 68 | | - ['OS!="win" and llvm_version=="0.0"', { | | 67 | + ['OS!="win" and clang==0', { | 69 | 68 | 'cflags': [ '-march=armv8-a+aes+crc' ], | 70 | 69 | }], | 71 | 70 | ['OS=="android"', { | | 111 | 110 | # 'target_name': 'zlib_crc32_simd', | 112 | 111 | # 'type': 'static_library', | 113 | 112 | # 'conditions': [ | 114 | | - # ['OS!="win" or llvm_version!="0.0"', { | | 113 | + # ['OS!="win" or clang==1', { | 115 | 114 | # 'cflags': [ | 116 | 115 | # '-msse4.2', | 117 | 116 | # '-mpclmul', | |
Collapse file Copy file name to clipboardExpand all lines: node.gyp +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 504 | 504 | '-Wl,-bnoerrmsg', | 505 | 505 | ], | 506 | 506 | }], | 507 | | - ['OS == "linux" and llvm_version != "0.0"', { | | 507 | + ['OS=="linux" and clang==1', { | 508 | 508 | 'libraries': ['-latomic'], | 509 | 509 | }], | 510 | 510 | ], | |
Collapse file Copy file name to clipboardExpand all lines: tools/v8_gypfiles/toolchain.gypi +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 134 | 134 | '<(V8_ROOT)/include', | 135 | 135 | ], | 136 | 136 | 'conditions': [ | 137 | | - ['clang', { | | 137 | + ['clang==1', { | 138 | 138 | 'cflags': [ '-Werror', '-Wno-unknown-pragmas' ], | 139 | 139 | },{ | 140 | 140 | 'cflags!': [ '-Wall', '-Wextra' ], | | 144 | 144 | '-flax-vector-conversions', | 145 | 145 | ], | 146 | 146 | }], | 147 | | - ['clang or OS!="win"', { | | 147 | + ['clang==1 or OS!="win"', { | 148 | 148 | 'cflags': [ '-Wno-invalid-offsetof' ], | 149 | 149 | 'xcode_settings': { | 150 | 150 | 'WARNING_CFLAGS': ['-Wno-invalid-offsetof'] | |
Collapse file Copy file name to clipboardExpand all lines: tools/v8_gypfiles/v8.gyp +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1879 | 1879 | ['enable_lto=="true"', { | 1880 | 1880 | 'cflags_cc': [ '-fno-lto' ], | 1881 | 1881 | }], | 1882 | | - ['clang or OS!="win"', { | | 1882 | + ['clang==1 or OS!="win"', { | 1883 | 1883 | 'conditions': [ | 1884 | 1884 | ['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', { | 1885 | 1885 | 'sources': [ | |
|