-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from getditto/tk/1.46
Update from Rust 1.43 to 1.46 and improve packaging in minor ways
- Loading branch information
Showing
7 changed files
with
75 additions
and
47 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,19 +1,16 @@ | ||
# 1. Select the best branch, tag or commit hash from https://github.com/apple/llvm-project | ||
# The recommended approach is to use the tagged release that matches the Swift version | ||
# returned by the command below (at this time running Xcode Version 11.3.1 (11C504)) | ||
# returned by the command below: | ||
# $ xcrun -sdk iphoneos swiftc --version | ||
# Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15) | ||
# Target: x86_64-apple-darwin19.3.0 | ||
|
||
LLVM_BRANCH="tags/swift-5.2.3-RELEASE" | ||
LLVM_BRANCH="tags/swift-5.3-RELEASE" | ||
|
||
# 2. Select the best branch, tag or commit hash from https://github.com/rust-lang/rust | ||
# The stable 1.40.0 version of Rust seems to work | ||
|
||
RUST_BRANCH="tags/1.43.0" | ||
RUST_BRANCH="tags/1.46.0" | ||
|
||
# 3. Select a name for the toolchain you want to install as. The toolchain will be installed | ||
# under $HOME/.rust-ios-arm64/toolchain-$RUST_TOOLCHAIN | ||
# under $HOME/.rustup/toolchains/rust-$RUST_TOOLCHAIN | ||
|
||
RUST_TOOLCHAIN="1.43.0" | ||
RUST_TOOLCHAIN="ios-arm64-1.46.0" | ||
|
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
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
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,40 @@ | ||
diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp | ||
index 6c31df3e173b..69aaaf6ca78e 100644 | ||
--- a/llvm/tools/llvm-config/llvm-config.cpp | ||
+++ b/llvm/tools/llvm-config/llvm-config.cpp | ||
@@ -707,7 +707,34 @@ int main(int argc, char **argv) { | ||
// Output system libraries only if linking against a static | ||
// library (since the shared library links to all system libs | ||
// already) | ||
- OS << (LinkMode == LinkModeStatic ? LLVM_SYSTEM_LIBS : "") << '\n'; | ||
+ | ||
+ // ========== BEGIN HACK ========== | ||
+ | ||
+ // There is a bug where "llvm-config --system-libs" will output long absolute paths. | ||
+ // This ends up with rust's cc doing bad things like "-llibz.tbd" or "-llibxml2.dylib". | ||
+ // Some attempts have been made to patch this but none of them have actually landed | ||
+ // in either LLVM 10 (which Apple is currently using) nor in LLVM 11. | ||
+ // | ||
+ // References: | ||
+ // https://discourse.brew.sh/t/llvm-config-10-0-1-advertise-libxml2-tbd-as-system-libs/8593/4 | ||
+ // https://reviews.llvm.org/D86134 | ||
+ // https://reviews.llvm.org/D87590 | ||
+ // | ||
+ // It appears that the right way to fix this involves LLVM's CMakeLists.txt where | ||
+ // these system libraries are calculated. Unfortunately I can't work out how to apply | ||
+ // the proposed fixes to apple's fork of LLVM as the CMake stuff is all a bit different. | ||
+ // | ||
+ // Rather than spend all week understanding LLVM's build system, I'm going to make the | ||
+ // bold assumption that everybody who's building this bitcode toolchain is running on | ||
+ // basically similar Macs, so if I just hardcode the right list of libraries here then | ||
+ // we'll all be okay. | ||
+ // | ||
+ // This can be removed when the appropriate upstream fix reaches Xcode's LLVM. | ||
+ | ||
+ //OS << (LinkMode == LinkModeStatic ? LLVM_SYSTEM_LIBS : "") << '\n'; | ||
+ OS << (LinkMode == LinkModeStatic ? "-lz -lcurses -lm -lxml2" : "") << '\n'; | ||
+ | ||
+ // ========== END HACK ========== | ||
} | ||
} else if (!Components.empty()) { | ||
WithColor::error(errs(), "llvm-config") |
This file was deleted.
Oops, something went wrong.