mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
build,win: enable clang-cl compilation
This uses the backported ICU fix needed for compiling with ClangCL. Refs: https://github.com/nodejs/node/pull/54502 Fixes: https://github.com/nodejs/node/issues/34201 PR-URL: https://github.com/nodejs/node/pull/54655 Refs: https://github.com/nodejs/node/issues/52809 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Steven R Loomis <srl295@gmail.com>
This commit is contained in:
parent
9404d3aaaf
commit
79a33a7433
@ -139,20 +139,43 @@
|
||||
# full data - just build the full data file, then we are done.
|
||||
'sources': [ '<(SHARED_INTERMEDIATE_DIR)/icudt<(icu_ver_major)<(icu_endianness)_dat.<(icu_asm_ext)' ],
|
||||
'dependencies': [ 'genccode#host' ],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'icudata',
|
||||
'msvs_quote_cmd': 0,
|
||||
'inputs': [ '<(icu_data_in)' ],
|
||||
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/icudt<(icu_ver_major)<(icu_endianness)_dat.<(icu_asm_ext)' ],
|
||||
# on Windows, we can go directly to .obj file (-o) option.
|
||||
'action': [ '<(PRODUCT_DIR)/genccode<(EXECUTABLE_SUFFIX)',
|
||||
'<@(icu_asm_opts)', # -o
|
||||
'-d', '<(SHARED_INTERMEDIATE_DIR)',
|
||||
'-n', 'icudata',
|
||||
'-e', 'icudt<(icu_ver_major)',
|
||||
'<@(_inputs)' ],
|
||||
},
|
||||
'conditions': [
|
||||
[ 'clang==1', {
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'icudata',
|
||||
'msvs_quote_cmd': 0,
|
||||
'inputs': [ '<(icu_data_in)' ],
|
||||
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/icudt<(icu_ver_major)<(icu_endianness)_dat.<(icu_asm_ext)' ],
|
||||
# on Windows, we can go directly to .obj file (-o) option.
|
||||
# for Clang use "-c <(target_arch)" option
|
||||
'action': [ '<(PRODUCT_DIR)/genccode<(EXECUTABLE_SUFFIX)',
|
||||
'<@(icu_asm_opts)', # -o
|
||||
'-c', '<(target_arch)',
|
||||
'-d', '<(SHARED_INTERMEDIATE_DIR)',
|
||||
'-n', 'icudata',
|
||||
'-e', 'icudt<(icu_ver_major)',
|
||||
'<@(_inputs)' ],
|
||||
},
|
||||
],
|
||||
}, {
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'icudata',
|
||||
'msvs_quote_cmd': 0,
|
||||
'inputs': [ '<(icu_data_in)' ],
|
||||
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/icudt<(icu_ver_major)<(icu_endianness)_dat.<(icu_asm_ext)' ],
|
||||
# on Windows, we can go directly to .obj file (-o) option.
|
||||
# for MSVC do not use "-c <(target_arch)" option
|
||||
'action': [ '<(PRODUCT_DIR)/genccode<(EXECUTABLE_SUFFIX)',
|
||||
'<@(icu_asm_opts)', # -o
|
||||
'-d', '<(SHARED_INTERMEDIATE_DIR)',
|
||||
'-n', 'icudata',
|
||||
'-e', 'icudt<(icu_ver_major)',
|
||||
'<@(_inputs)' ],
|
||||
},
|
||||
],
|
||||
}]
|
||||
],
|
||||
}, { # icu_small == TRUE and OS == win
|
||||
# link against stub data primarily
|
||||
|
@ -1890,7 +1890,31 @@
|
||||
['enable_lto=="true"', {
|
||||
'cflags_cc': [ '-fno-lto' ],
|
||||
}],
|
||||
['clang==1 or OS!="win"', {
|
||||
# Chnges in push_registers_asm.cc in V8 v12.8 requires using
|
||||
# push_registers_masm on Windows even with ClangCL on x64
|
||||
['OS=="win"', {
|
||||
'conditions': [
|
||||
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
|
||||
'sources': [
|
||||
'<(V8_ROOT)/src/heap/base/asm/x64/push_registers_masm.asm',
|
||||
],
|
||||
}],
|
||||
['_toolset == "host" and host_arch == "arm64" or _toolset == "target" and target_arch=="arm64"', {
|
||||
'conditions': [
|
||||
['clang==1', {
|
||||
'sources': [
|
||||
'<(V8_ROOT)/src/heap/base/asm/arm64/push_registers_asm.cc',
|
||||
],
|
||||
}],
|
||||
['clang==0', {
|
||||
'sources': [
|
||||
'<(V8_ROOT)/src/heap/base/asm/arm64/push_registers_masm.S',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
}, { # 'OS!="win"'
|
||||
'conditions': [
|
||||
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
|
||||
'sources': [
|
||||
@ -1939,20 +1963,6 @@
|
||||
}],
|
||||
]
|
||||
}],
|
||||
['OS=="win" and clang==0', {
|
||||
'conditions': [
|
||||
['_toolset == "host" and host_arch == "x64" or _toolset == "target" and target_arch=="x64"', {
|
||||
'sources': [
|
||||
'<(V8_ROOT)/src/heap/base/asm/x64/push_registers_masm.asm',
|
||||
],
|
||||
}],
|
||||
['_toolset == "host" and host_arch == "arm64" or _toolset == "target" and target_arch=="arm64"', {
|
||||
'sources': [
|
||||
'<(V8_ROOT)/src/heap/base/asm/arm64/push_registers_masm.S',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
}, # v8_heap_base
|
||||
|
Loading…
Reference in New Issue
Block a user