Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gyp: use LDFLAGS_host for host toolset #98

Merged
merged 2 commits into from
Apr 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion pylib/gyp/generator/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def CalculateGeneratorInputInfo(params):
CXX.host ?= %(CXX.host)s
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
LINK.host ?= %(LINK.host)s
LDFLAGS.host ?=
LDFLAGS.host ?= $(LDFLAGS_host)
AR.host ?= %(AR.host)s

# Define a dir function that can handle spaces.
Expand Down
6 changes: 5 additions & 1 deletion pylib/gyp/generator/ninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,11 @@ def WriteLinkForArch(
is_executable = spec["type"] == "executable"
# The ldflags config key is not used on mac or win. On those platforms
# linker flags are set via xcode_settings and msvs_settings, respectively.
env_ldflags = os.environ.get("LDFLAGS", "").split()
if self.toolset == "target":
env_ldflags = os.environ.get("LDFLAGS", "").split()
elif self.toolset == "host":
env_ldflags = os.environ.get("LDFLAGS_host", "").split()

if self.flavor == "mac":
ldflags = self.xcode_settings.GetLdflags(
config_name,
Expand Down