Skip to content
Open
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: 2 additions & 0 deletions pylib/gyp/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,8 @@ def GetFlavorByPlatform():
return "zos"
if sys.platform == "os400":
return "os400"
if re.fullmatch("gnu\\d+", sys.platform):
return "hurd"

return "linux"

Expand Down
1 change: 1 addition & 0 deletions pylib/gyp/common_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def test_platform_default(self):
self.assertFlavor("linux", "linux2", {})
self.assertFlavor("linux", "linux3", {})
self.assertFlavor("linux", "linux", {})
self.assertFlavor("hurd", "gnu0", {})

def test_param(self):
self.assertFlavor("foobar", "linux2", {"flavor": "foobar"})
Expand Down
4 changes: 2 additions & 2 deletions pylib/gyp/generator/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ def WriteTarget(
self.flavor not in ("mac", "openbsd", "netbsd", "win")
and not self.is_standalone_static_library
):
if self.flavor in ("linux", "android", "openharmony"):
if self.flavor in ("linux", "android", "openharmony", "hurd"):
self.WriteMakeRule(
[self.output_binary],
link_deps,
Expand All @@ -1902,7 +1902,7 @@ def WriteTarget(
part_of_all,
postbuilds=postbuilds,
)
elif self.flavor in ("linux", "android", "openharmony"):
elif self.flavor in ("linux", "android", "openharmony", "hurd"):
self.WriteMakeRule(
[self.output_binary],
link_deps,
Expand Down
1 change: 1 addition & 0 deletions test_gyp.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def main(argv=None):
# https://bugs.chromium.org/p/gyp/issues/detail?id=530
# 'darwin': ['make', 'ninja', 'xcode', 'xcode-ninja'],
"darwin": ["make", "ninja", "xcode"],
"gnu0": ["make", "ninja"],
}[sys.platform]

gyp_options = []
Expand Down
Loading