Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
build: fix ARM build
Browse files Browse the repository at this point in the history
Several fixes needed:
1. Don't pass in the platform to ChakraCore-
   it'll figure out the right SDK version
2. Disable intl on ARM if cross-compiling
3. Set the default SDK version if compiling ARM to
   be v10.0 since Node doesn't seem to compile for
   Windows on ARM with the older SDKs.
  • Loading branch information
kfarnung committed May 26, 2017
1 parent cf718ec commit 50b199d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 0 additions & 4 deletions deps/chakrashim/chakracore.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
'library%': 'static_library', # build chakracore as static library or dll
'component%': 'static_library', # link crt statically or dynamically
'chakra_dir%': 'core',
'msvs_windows_target_platform_version_prop': '',
'icu_args%': '',
'icu_include_path%': '',
'linker_start_group%': '',
Expand All @@ -19,8 +18,6 @@
['target_arch=="x64"', { 'Platform': 'x64' }],
['target_arch=="arm"', {
'Platform': 'arm',
'msvs_windows_target_platform_version_prop':
'/p:WindowsTargetPlatformVersion=$(WindowsTargetPlatformVersion)',
}],
['OS!="win"', {
'icu_include_path': '../<(icu_path)/source/common'
Expand Down Expand Up @@ -113,7 +110,6 @@
'/p:Configuration=$(ConfigurationName)',
'/p:RuntimeLib=<(component)',
'/p:AdditionalPreprocessorDefinitions=COMPILE_DISABLE_Simdjs=1',
'<(msvs_windows_target_platform_version_prop)',
'/m',
'<@(_inputs)',
],
Expand Down
8 changes: 8 additions & 0 deletions tools/gyp/pylib/gyp/generator/msvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3128,6 +3128,14 @@ def _FinalizeMSBuildSettings(spec, configuration):
if def_file:
_ToolAppend(msbuild_settings, 'Link', 'ModuleDefinitionFile', def_file)
configuration['finalized_msbuild_settings'] = msbuild_settings

# Node for Windows on ARM requires at least the Windows 10 SDK
# to build. If it hasn't already been provided, set the default
# to v10.0
if "msvs_windows_sdk_version" not in configuration:
if configuration.get('msvs_configuration_platform', 'Win32') == 'ARM':
configuration['msvs_windows_sdk_version'] = 'v10.0'

if prebuild:
_ToolAppend(msbuild_settings, 'PreBuildEvent', 'Command', prebuild)
if postbuild:
Expand Down
7 changes: 7 additions & 0 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ if "%i18n_arg%"=="intl-none" set configure_flags=%configure_flags% --with-intl=n
if "%i18n_arg%"=="without-intl" set configure_flags=%configure_flags% --without-intl
if "%engine%"=="chakracore" set configure_flags=%configure_flags% --without-bundled-v8&set chakra_jslint=deps\chakrashim\lib

if "%target_arch%"=="arm" (
if "%PROCESSOR_ARCHITECTURE%" NEQ "ARM" (
echo Skipping building ARM with Intl on a non-ARM device
set configure_flags=%configure_flags% --without-intl
)
)

if defined config_flags set configure_flags=%configure_flags% %config_flags%

if not exist "%~dp0deps\icu" goto no-depsicu
Expand Down

0 comments on commit 50b199d

Please sign in to comment.