Skip to content

SGX: Fix target linker used by bootstrap #67023

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

jethrogb
Copy link
Contributor

@jethrogb jethrogb commented Dec 4, 2019

Bootstrap, for some reason, overrides the target linker. This is not correct for x86_64-fortanix-unknown-sgx. Add such targets to the list of exceptions.

r? @alexcrichton

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 4, 2019
@jethrogb
Copy link
Contributor Author

jethrogb commented Dec 4, 2019

I'm not super happy with the current solution.

I think at the very least bootstrap shouldn't be overriding the linker if the Rust target spec has a specific linker defined. At the time bootstrap needs to construct the cargo command to build some target artifact, it should always be able to figure this out from rustc.

Furthermore I don't really understand why this needs overriding at all. I did some git archeology and this override was already in the original 2015 bootstrap code by @alexcrichton without any explanation.

However, I don't really have the bandwidth to work on a different fix.

cc @parthsane

@alexcrichton
Copy link
Member

@bos: r+ rollup

@Centril
Copy link
Contributor

Centril commented Dec 5, 2019

@bors r=alexcrichton

@bors
Copy link
Collaborator

bors commented Dec 5, 2019

📌 Commit 22d9f20 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 5, 2019
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Dec 6, 2019
…, r=alexcrichton

SGX: Fix target linker used by bootstrap

Bootstrap, for some reason, overrides the target linker. This is not correct for x86_64-fortanix-unknown-sgx. Add such targets to the list of exceptions.

r? @alexcrichton
bors added a commit that referenced this pull request Dec 6, 2019
Rollup of 11 pull requests

Successful merges:

 - #66846 (Make try_mark_previous_green aware of cycles.)
 - #66959 (Remove potential cfgs duplicates)
 - #66988 (Fix angle bracket formatting when dumping MIR debug vars)
 - #66998 (Modified the testcases for VxWorks)
 - #67008 (rustdoc: Add test for fixed issue)
 - #67023 (SGX: Fix target linker used by bootstrap)
 - #67033 (Migrate to LLVM{Get,Set}ValueName2)
 - #67049 (Simplify {IoSlice, IoSliceMut}::advance examples and tests)
 - #67054 (codegen "unreachable" for invalid SetDiscriminant)
 - #67081 (Fix Query type docs)
 - #67085 (Remove boxed closures in address parser.)

Failed merges:

r? @ghost
@bors bors merged commit 22d9f20 into rust-lang:master Dec 6, 2019
bors added a commit that referenced this pull request Dec 12, 2019
Bootstrap: change logic for choosing linker and rpath

This is a follow-up from #66957 and #67023. Apparently there was one more location with a hard-coded list of targets to influence linking.

I've filed #67171 to track this madness.

r? @alexcrichton
@workingjubilee workingjubilee added the O-SGX Target: SGX label Jul 30, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
O-SGX Target: SGX S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants