Skip to content

Commit

Permalink
feat: use LDFLAGS_host for host toolset (#98)
Browse files Browse the repository at this point in the history
This makes the behaviour similar to that of CFLAGS_host
  • Loading branch information
isuruf committed Apr 2, 2021
1 parent 3f83e99 commit bea5c7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pylib/gyp/generator/make.py
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
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

0 comments on commit bea5c7b

Please sign in to comment.