Skip to content

Commit

Permalink
win: auto-include marmasm sections for Windows on ARM (nodejs#65)
Browse files Browse the repository at this point in the history
This removes the msvs_enable_marmasm configuration option that becomes
unnecessary.

Closes: nodejs/gyp-next#64
  • Loading branch information
targos committed Sep 28, 2020
1 parent 2fd03a5 commit 88f105e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Removed
- The `--no-duplicate-basename-check` option was removed.
- The `msvs_enable_marmasm` configuration option was removed in favor of
auto-inclusion of the "marmasm" sections for Windows on ARM.

## [0.4.0] - 2020-07-14

Expand Down
9 changes: 5 additions & 4 deletions pylib/gyp/generator/msvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"msvs_enable_winrt",
"msvs_requires_importlibrary",
"msvs_enable_winphone",
"msvs_enable_marmasm",
"msvs_application_type_revision",
"msvs_target_platform_version",
"msvs_target_platform_minversion",
Expand Down Expand Up @@ -3671,6 +3670,7 @@ def _GetMSBuildProjectReferences(project):
def _GenerateMSBuildProject(project, options, version, generator_flags, spec):
spec = project.spec
configurations = spec["configurations"]
toolset = spec["toolset"]
project_dir, project_file_name = os.path.split(project.path)
gyp.common.EnsureDirExists(project.path)
# Prepare list of sources and excluded sources.
Expand All @@ -3684,6 +3684,7 @@ def _GenerateMSBuildProject(project, options, version, generator_flags, spec):
rule_dependencies = set()
extension_to_rule_name = {}
list_excluded = generator_flags.get("msvs_list_excluded_files", True)
platforms = _GetUniquePlatforms(spec)

# Don't generate rules if we are using an external builder like ninja.
if not spec.get("msvs_external_builder"):
Expand Down Expand Up @@ -3726,7 +3727,7 @@ def _GenerateMSBuildProject(project, options, version, generator_flags, spec):
sources,
rule_dependencies,
extension_to_rule_name,
_GetUniquePlatforms(spec),
platforms,
)
missing_sources = _VerifySourcesExist(sources, project_dir)

Expand Down Expand Up @@ -3779,7 +3780,7 @@ def _GenerateMSBuildProject(project, options, version, generator_flags, spec):
content += _GetMSBuildLocalProperties(project.msbuild_toolset)
content += import_cpp_props_section
content += import_masm_props_section
if spec.get("msvs_enable_marmasm"):
if "arm64" in platforms and toolset == "target":
content += import_marmasm_props_section
content += _GetMSBuildExtensions(props_files_of_rules)
content += _GetMSBuildPropertySheets(configurations, spec)
Expand All @@ -3801,7 +3802,7 @@ def _GenerateMSBuildProject(project, options, version, generator_flags, spec):
content += _GetMSBuildProjectReferences(project)
content += import_cpp_targets_section
content += import_masm_targets_section
if spec.get("msvs_enable_marmasm"):
if "arm64" in platforms and toolset == "target":
content += import_marmasm_targets_section
content += _GetMSBuildExtensionTargets(targets_files_of_rules)

Expand Down

0 comments on commit 88f105e

Please sign in to comment.