Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Simplify C compilation for Fortanix-SGX target #83204

Merged
merged 1 commit into from
Mar 18, 2021

Conversation

jethrogb
Copy link
Contributor

@rust-highfive
Copy link
Collaborator

r? @kennytm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 16, 2021
.gitattributes Outdated
src/vendor/** -text
Cargo.lock linguist-generated=false

# Older git versions try to fix line endings on images, this prevents it.
*.png binary
*.ico binary
*.woff binary
*.woff2 binary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an unrelated change bundled into this PR.

CC_x86_64_fortanix_unknown_sgx=clang-11 \
CFLAGS_x86_64_fortanix_unknown_sgx="-D__ELF__ -isystem/usr/include/x86_64-linux-gnu -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening" \
CXX_x86_64_fortanix_unknown_sgx=clang++-11 \
CXXFLAGS_x86_64_fortanix_unknown_sgx="-D__ELF__ -isystem/usr/include/x86_64-linux-gnu -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. In general, I'd be concerned about assuming that system headers will work for a different target (it's always a challenge to build a non-host target using a host compiler while cancelling out any assumptions that hold for one and not the other), but I don't think that's an issue for a highly controlled Docker environment like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not just “system headers” but specifically the x86_64-linux-gnu headers. I think it's better this way than the previous solution.

@joshtriplett
Copy link
Member

Looks reasonable to me. r=me if you split out the unrelated change into a separate PR.

@jethrogb
Copy link
Contributor Author

@joshtriplett Thanks, can you delegate to @raoulstrackx I'd like him to take a look as well.

@raoulstrackx
Copy link
Contributor

bors r=me

@kennytm
Copy link
Member

kennytm commented Mar 17, 2021

@bors r=joshtriplett,raoulstrackx

@bors
Copy link
Contributor

bors commented Mar 17, 2021

📌 Commit 5bd50ef has been approved by joshtriplett,raoulstrackx

@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 Mar 17, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Mar 17, 2021
…lett,raoulstrackx

Simplify C compilation for Fortanix-SGX target

cc `@raoulstrackx`
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 17, 2021
Rollup of 11 pull requests

Successful merges:

 - rust-lang#82191 (Vec::dedup_by optimization)
 - rust-lang#82270 (Emit error when trying to use assembler syntax directives in `asm!`)
 - rust-lang#82434 (Add more links between hash and btree collections)
 - rust-lang#83080 (Make source-based code coverage compatible with MIR inlining)
 - rust-lang#83168 (Extend `proc_macro_back_compat` lint to `procedural-masquerade`)
 - rust-lang#83192 (ci/docker: Add SDK/NDK level 21 to android docker for 32bit platforms)
 - rust-lang#83204 (Simplify C compilation for Fortanix-SGX target)
 - rust-lang#83216 (Allow registering tool lints with `register_tool`)
 - rust-lang#83223 (Display error details when a `mmap` call fails)
 - rust-lang#83228 (Don't show HTML diff if tidy isn't installed for rustdoc tests)
 - rust-lang#83231 (Switch riscvgc-unknown-none-elf use lp64d ABI)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 201893f into rust-lang:master Mar 18, 2021
@rustbot rustbot added this to the 1.52.0 milestone Mar 18, 2021
@workingjubilee workingjubilee added the O-SGX Target: SGX label Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

8 participants