-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swift: remove linux from standard pack
This still defines a pack with linux included for development. `//swift:install` will still also include linux.
- Loading branch information
Paolo Tranquilli
committed
Dec 13, 2024
1 parent
2cbb072
commit a75f5fa
Showing
2 changed files
with
72 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
def select_os(linux = None, macos = None, windows = None, posix = None, otherwise = []): | ||
selection = {} | ||
if posix != None: | ||
if linux != None or macos != None: | ||
fail("select_os: cannot specify both posix and linux or macos") | ||
selection["@platforms//os:linux"] = posix | ||
selection["@platforms//os:macos"] = posix | ||
if linux != None: | ||
selection["@platforms//os:linux"] = linux | ||
if macos != None: | ||
selection["@platforms//os:macos"] = macos | ||
if windows != None: | ||
selection["@platforms//os:windows"] = windows | ||
if len(selection) < 3: | ||
selection["//conditions:default"] = otherwise | ||
elif otherwise != []: | ||
fail("select_os: cannot specify all three OSes and an otherwise") | ||
return select(selection) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters