-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make linker flags consistent between release and local development.
The /DEPENDENTLOADFLAG was not actually applying to the release builds.
- Loading branch information
1 parent
ecd873e
commit bfaf686
Showing
3 changed files
with
31 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
# NOTE NOTE NOTE NOTE NOTE NOTE | ||
# | ||
# For some reason these flags are NOT respected when running in GitHub actions. They are respected | ||
# when building locally. So keep these settings in sync with .github/workflows/release.yml . | ||
# | ||
# NOTE NOTE NOTE NOTE NOTE NOTE | ||
|
||
|
||
# Use LLD since it is faster. | ||
# TODO: figure out how to make this work in CI | ||
#[target.x86_64-unknown-linux-gnu] | ||
#rustflags = ["-C", "link-arg=-fuse-ld=lld"] | ||
#[target.aarch64-unknown-linux-gnu] | ||
#rustflags = ["-C", "link-arg=-fuse-ld=lld"] | ||
|
||
# We only link to DLLs in System32, so limit the OS loader to looking in there. | ||
# https://learn.microsoft.com/cpp/build/reference/dependentloadflag | ||
# Build all crates with a statically linked MSVCRT. Specifically crates | ||
# that use `cc` in their build scripts (like libgit2-sys), will detect this | ||
# and compile objects appropriately. If there is a way to put this into a | ||
# Cargo config file some where, let me know. .cargo/config did not work. | ||
[target.'cfg(target_env = "msvc")'] | ||
rustflags = ["-C", "link-arg=/DEPENDENTLOADFLAG:0x800", "-C", "target-feature=+crt-static"] |
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