You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prevent most fixups (such as rustc_flags) from applying to buildscript
Summary:
In the fixups we use for `coreaudio-sys` and `rustix`, it is very surprising that the `rustc_flags` they specify were getting applied against **both** the library and the library's build script.
https://www.internalfb.com/code/fbsource/[3bec93b51a600700d81b31f6cc00c31af209902f]/third-party/rust/fixups/coreaudio-sys/fixups.toml?lines=3%2C11-17https://www.internalfb.com/code/fbsource/[3bec93b51a600700d81b31f6cc00c31af209902f]/third-party/rust/fixups/rustix/fixups.toml?lines=3-4
Flags like `-lframework=AudioUnit` and `-Zdefault-visibility=hidden` are definitely intended for the library only.
This diff rearranges Reindeer's processing of fixups for libraries and build scripts to make build scripts only receive fixups pertaining to `srcs` (such as `extra_srcs`), `mapped_srcs` (such as `overlay`), and `features`. Other fixups such as `rustc_flags` and `env` and `link_style` should *not* get applied to the build script.
For `link_style` (since D74046797) and for `env` (since D73977930), it's now possible to control those for the build script build independently of the library.
```lang=toml
# before: applied to both
# now: not build script
rustc_flags = [...]
link_style = "..."
env = {...}
[buildscript.build]
# for build script build
link_style = "..."
env = {...}
# if ever needed, add support for rustc_flags here
```
Reviewed By: JakobDegen
Differential Revision: D74046795
fbshipit-source-id: a6592b7827424c00e5b2683bbc2ef0ed74dda6b3
0 commit comments