forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meson: Patch to ingest env vars like autoconf
See comment in code and the PR it references, mesonbuild/meson#6827, for details. We can remove entries from the cross file because they will be gotten from env vars now.
- Loading branch information
1 parent
3c00ca0
commit 128b93e
Showing
2 changed files
with
21 additions
and
6 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
16 changes: 16 additions & 0 deletions
16
pkgs/development/tools/build-managers/meson/more-env-vars.patch
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,16 @@ | ||
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py | ||
index ac13a710..e0d07c51 100644 | ||
--- a/mesonbuild/envconfig.py | ||
+++ b/mesonbuild/envconfig.py | ||
@@ -119,9 +119,9 @@ def get_env_var_pair(for_machine: MachineChoice, | ||
# compiling we fall back on the unprefixed host version. This | ||
# allows native builds to never need to worry about the 'BUILD_*' | ||
# ones. | ||
- ([var_name + '_FOR_BUILD'] if is_cross else [var_name]), | ||
+ [var_name + '_FOR_BUILD'] + ([] if is_cross else [var_name]), | ||
# Always just the unprefixed host verions | ||
- ([] if is_cross else [var_name]), | ||
+ [var_name], | ||
)[for_machine] | ||
for var in candidates: | ||
value = os.environ.get(var) |