Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build,win: add support for MSVC cross-compilation
* Fixes cases in icutools where commands were issued without .exe
* Changes to build scripts
* Add /fp:strict flag so that MSVC's floating point behaves correctly
* Enables marmasm

Change-Id: Ife1fd90de271edd9dcefdef5fe439d7a9a05e8dc
  • Loading branch information
richard-townsend-arm authored and joaocgreis committed May 18, 2020
commit 3f582562df0c2fc51abee486b2cdef39d00f3230
5 changes: 5 additions & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@
],
'msvs_settings': {
'VCCLCompilerTool': {
'conditions': [
['target_arch=="arm64"', {
'FloatingPointModel': 1 # /fp:strict
}]
],
'EnableFunctionLevelLinking': 'true',
'EnableIntrinsicFunctions': 'true',
'FavorSizeOrSpeed': 1, # /Ot, favor speed over size
Expand Down
4 changes: 3 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,9 @@ def configure_node(o):

cross_compiling = (options.cross_compiling
if options.cross_compiling is not None
else target_arch != host_arch)
else host_arch not in (target_arch, "x64", "ia32"))
if cross_compiling:
os.environ['GYP_CROSSCOMPILE'] = "1"
if options.unused_without_snapshot:
warn('building --without-snapshot is no longer possible')

Expand Down
14 changes: 7 additions & 7 deletions tools/icu/icu-generic.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
}],
['_toolset=="host"', {
'type': 'none',
'dependencies': [ 'icutools' ],
'dependencies': [ 'icutools#host' ],
'export_dependent_settings': [ 'icutools' ],
}],
],
Expand All @@ -221,7 +221,7 @@
'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',
'action': [ '<(PRODUCT_DIR)/genccode<(EXECUTABLE_SUFFIX)',
'<@(icu_asm_opts)', # -o
'-d', '<(SHARED_INTERMEDIATE_DIR)',
'-n', 'icudata',
Expand Down Expand Up @@ -258,7 +258,7 @@
'msvs_quote_cmd': 0,
'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/icutmp/icudt<(icu_ver_major)<(icu_endianness).dat' ],
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/icudt<(icu_ver_major)<(icu_endianness)_dat.<(icu_asm_ext)' ],
'action': [ '<(PRODUCT_DIR)/genccode',
'action': [ '<(PRODUCT_DIR)/genccode<(EXECUTABLE_SUFFIX)',
'<@(icu_asm_opts)', # -o
'-d', '<(SHARED_INTERMEDIATE_DIR)/',
'-n', 'icudata',
Expand All @@ -284,7 +284,7 @@
'action_name': 'icupkg',
'inputs': [ '<(icu_data_in)' ],
'outputs':[ '<(SHARED_INTERMEDIATE_DIR)/icudt<(icu_ver_major)<(icu_endianness).dat' ],
'action': [ '<(PRODUCT_DIR)/icupkg',
'action': [ '<(PRODUCT_DIR)/icupkg<(EXECUTABLE_SUFFIX)',
'-t<(icu_endianness)',
'<@(_inputs)',
'<@(_outputs)',
Expand All @@ -305,7 +305,7 @@
'action_name': 'icudata',
'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/icudt<(icu_ver_major).dat' ],
'outputs':[ '<(SHARED_INTERMEDIATE_DIR)/icudt<(icu_ver_major)_dat.<(icu_asm_ext)' ],
'action': [ '<(PRODUCT_DIR)/genccode',
'action': [ '<(PRODUCT_DIR)/genccode<(EXECUTABLE_SUFFIX)',
'-e', 'icudt<(icu_ver_major)',
'-d', '<(SHARED_INTERMEDIATE_DIR)',
'<@(icu_asm_opts)',
Expand Down Expand Up @@ -350,7 +350,7 @@
'action_name': 'genccode',
'inputs': [ '<(SHARED_INTERMEDIATE_DIR)/icutmp/icusmdt<(icu_ver_major).dat' ],
'outputs': [ '<(SHARED_INTERMEDIATE_DIR)/icusmdt<(icu_ver_major)_dat.<(icu_asm_ext)' ],
'action': [ '<(PRODUCT_DIR)/genccode',
'action': [ '<(PRODUCT_DIR)/genccode<(EXECUTABLE_SUFFIX)',
'<@(icu_asm_opts)',
'-d', '<(SHARED_INTERMEDIATE_DIR)',
'<@(_inputs)' ],
Expand Down Expand Up @@ -388,7 +388,7 @@
'toolsets': [ 'target', 'host' ],
'conditions' : [
['_toolset=="host"', {
'dependencies': [ 'icutools' ],
'dependencies': [ 'icutools#host' ],
'export_dependent_settings': [ 'icutools' ],
}],
['_toolset=="target"', {
Expand Down
13 changes: 13 additions & 0 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,11 @@
'toolsets': ['target'],
'conditions': [
['want_separate_host_toolset', {
'conditions': [
['v8_target_arch=="arm64"', {
'msvs_enable_marmasm': 1,
}]
],
'dependencies': [
'generate_bytecode_builtins_list',
'run_torque',
Expand Down Expand Up @@ -785,6 +790,14 @@
'sources': [ ### gcmole(arch:arm64) ###
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_current_cpu == \\"arm64\\".*?sources \+= ")',
],
'conditions': [
['OS=="win"', {
'sources': [
"<(V8_ROOT)/src/diagnostics/unwinding-info-win64.cc",
"<(V8_ROOT)/src/diagnostics/unwinding-info-win64.h"
],
}],
],
}],
['v8_target_arch=="mips" or v8_target_arch=="mipsel"', {
'sources': [ ### gcmole(arch:mipsel) ###
Expand Down
2 changes: 1 addition & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ if defined config_flags set configure_flags=%configure_flags% %config_flags%
if defined target_arch set configure_flags=%configure_flags% --dest-cpu=%target_arch%
if defined openssl_no_asm set configure_flags=%configure_flags% --openssl-no-asm
if defined DEBUG_HELPER set configure_flags=%configure_flags% --verbose
if "%target_arch%"=="x86" if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set configure_flags=%configure_flags% --no-cross-compiling
if "%target_arch%" == "arm64" set configure_flags=%configure_flags% --cross-compiling

if not exist "%~dp0deps\icu" goto no-depsicu
if "%target%"=="Clean" echo deleting %~dp0deps\icu
Expand Down