-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fortanix SGX target libunwind build process changes #72937
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
Update LLVM submodule to include lld NOLOAD fix > Rust nightly 2020-05-22 and later ships lld with a regression related to linker scripts: NOLOAD sections incorrectly generate sections filled with 0s. This causes gdb and other elf loaders to write to reserved or otherwise invalid addresses (gdb also seems confused by the resulting ELF files and spits out a warning about the sections). This is particularly a problem for embedded rust projects that use lld by default and have affected linker scripts (cortex-m-rt based projects for instance). rust-lang/llvm-project#64 Note that this also pulls in llvm changes from rust-lang#72937
☔ The latest upstream changes (presumably #73072) made this pull request unmergeable. Please resolve the merge conflicts. |
Let's wait with this until after #72655 is merged. I don't think you can remove |
Blocked on #72655 |
☔ The latest upstream changes (presumably #72655) made this pull request unmergeable. Please resolve the merge conflicts. |
e8183ce
to
411dfc7
Compare
@rustbot modify labels: -S-blocked +S-waiting-on-review |
@@ -24,39 +24,4 @@ install_prereq() { | |||
clang-11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also be able to delete these lines:
url="https://github.com/fortanix/llvm-project/archive/${1}.tar.gz"
repo_name="llvm-project"
and
if [ -z "$1" ]; then
echo "Usage: ${0} <commit_id>"
exit -1
fi
(and make the corresponding change in the Dockerfile)
// libunwind requires support for rwlock and printing to stderr, | ||
// which is provided by std for this target. | ||
if target == "x86_64-fortanix-unknown-sgx" { | ||
let src_path_env = "X86_FORTANIX_SGX_LIBS"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we issue a warning for some time that this env var is no longer used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -73,7 +73,7 @@ COPY dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh /usr/bin/x86_64-fo | |||
RUN ln -s /usr/bin/x86_64-fortanix-unknown-sgx-clang-11 /usr/bin/x86_64-fortanix-unknown-sgx-clang++-11 | |||
# We pass the commit id of the port of LLVM's libunwind to the build script. | |||
# Any update to the commit id here, should cause the container image to be re-built from this point on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment is now obsolete
@bors r+ |
📌 Commit db6fa2f has been approved by |
…arth Rollup of 12 pull requests Successful merges: - rust-lang#72771 (Warn if linking to a private item) - rust-lang#72937 (Fortanix SGX target libunwind build process changes) - rust-lang#73485 (Perform obligation deduplication to avoid buggy `ExistentialMismatch`) - rust-lang#73529 (Add liballoc impl SpecFromElem for i8) - rust-lang#73579 (add missing doc links) - rust-lang#73627 (Shortcuts for min/max on double-ended BTreeMap/BTreeSet iterators) - rust-lang#73691 (Bootstrap: detect Windows based on sys.platform) - rust-lang#73694 (Document the Self keyword) - rust-lang#73718 (Document the super keyword) - rust-lang#73728 (Document some invariants correctly/more) - rust-lang#73738 (Remove irrelevant comment) - rust-lang#73765 (Remove blank line) Failed merges: r? @ghost
The code using `fetch_github_commit_archive` was removed in rust-lang#72937.
Ticket: fortanix/rust-sgx#174
LLVM related changes (merged): rust-lang/llvm-project#57
Description: libunwind changes needed to run code in sgx environment via rust-sgx.
Target that uses this in rust: x86_64-fortanix-unknown-sgx.
Without this change, rust std for this toolchain is forced to use a precompiled library loaded via environment variable.
With this change we act the same as musl target.