-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
llvmPackages.*: Add devExtraCmakeFlags parameter
cmake flags have a 'last flag wins' logic, so by appending to the end of the flags it is possible to override any cmake flag. It also ignores (and warns) if a flag is unused, so passing flags across all packages should be safe if you want to target one package. In combination with #320261, this PR allows consistently overriding all packages within LLVM with additional cmake arguments. Consistency here means for example 'if you override LLVM, then all dependencies on it are also see the overridden LLVM in their input'. Consistency is hard to achieve with the other obvious way of implementing this as a user: if you use overrideAttrs then you have to write a big mess of override code in order to override all dependents, and this can be very difficult in a cross-compilation scenario using crossSystem and useLLVM, for example. With this PR it is possible to write an overlay which overlays `llvmPackages` with `llvmPackage.override { devExtraCmakeFlags = [ ... ]; }`, and then the toolchain used with useLLVM in effect should respect these flags. This is useful in development for experimenting with the effect of various flags, hence the chosen name `devCmakeFlags`. This won't work out of the box without #341855 applied, which fixes override passthrough. See-Also: #320261, #341855 Signed-off-by: Peter Waller <[email protected]>
- Loading branch information
Showing
10 changed files
with
29 additions
and
13 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
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
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
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
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
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
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
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
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
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