Skip to content

Commit

Permalink
fixup! build,win: add support for MSVC cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
joaocgreis committed May 18, 2020
1 parent 3f58256 commit 87f3389
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ def configure_node(o):

cross_compiling = (options.cross_compiling
if options.cross_compiling is not None
else host_arch not in (target_arch, "x64", "ia32"))
else target_arch != host_arch)
if cross_compiling:
os.environ['GYP_CROSSCOMPILE'] = "1"
if options.unused_without_snapshot:
Expand Down
3 changes: 2 additions & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ 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%" == "arm64" set configure_flags=%configure_flags% --cross-compiling
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

0 comments on commit 87f3389

Please sign in to comment.