Skip to content

Commit

Permalink
Bug 1916426 - Pass our LDFLAGS last to the linker command line cargo …
Browse files Browse the repository at this point in the history
…invokes r=firefox-build-system-reviewers,sergesanspaille

See llvm/llvm-project#107365 (comment)
for an example of how things can go wrong when they are passed first.

I don't think there was a specific reason for them to have been put
first in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D222899

UltraBlame original commit: f6cff71bfc6cba2b1d37d79fce2cb6b5d0b00852
  • Loading branch information
marco-c committed Sep 20, 2024
1 parent f9ba733 commit 052f7b5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
6 changes: 3 additions & 3 deletions build/cargo-host-linker
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ eval
{
MOZ_CARGO_WRAP_HOST_LD
}
{
MOZ_CARGO_WRAP_HOST_LDFLAGS
}
'
"
"
'
{
MOZ_CARGO_WRAP_HOST_LDFLAGS
}
4 changes: 2 additions & 2 deletions build/cargo-host-linker.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension
MOZ_CARGO_WRAP_HOST_LD
%
%
MOZ_CARGO_WRAP_HOST_LDFLAGS
*
%
MOZ_CARGO_WRAP_HOST_LDFLAGS
%
*
25 changes: 16 additions & 9 deletions build/cargo-linker
Original file line number Diff line number Diff line change
Expand Up @@ -398,17 +398,8 @@ MOZ_CARGO_WRAP_LD
]
args
=
split
(
os
.
environ
[
"
MOZ_CARGO_WRAP_LDFLAGS
"
]
)
for
arg
in
Expand Down Expand Up @@ -565,6 +556,22 @@ append
(
arg
)
args
.
extend
(
split
(
os
.
environ
[
"
MOZ_CARGO_WRAP_LDFLAGS
"
]
)
)
wrap_ld
=
split
Expand Down
4 changes: 2 additions & 2 deletions build/cargo-linker.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ off
MOZ_CARGO_WRAP_LD
%
%
MOZ_CARGO_WRAP_LDFLAGS
*
%
MOZ_CARGO_WRAP_LDFLAGS
%
*

0 comments on commit 052f7b5

Please sign in to comment.