Created
June 12, 2017 03:46
-
-
Save bschwind/94c6956a7c6adb1b0b14e6ac87cf82ab to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Lifted from https://news.ycombinator.com/item?id=14305084 | |
% cat test.rs | |
fn main() { | |
println!("Hello, world!"); | |
} | |
% rustc --emit llvm-bc -C lto test.rs | |
% LIB=$HOME/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib | |
% xcrun --toolchain XcodeDefault clang -o test test.bc ~/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-ea49ffd3fee5264c.rlib | |
warning: overriding the module target triple with x86_64-apple-macosx10.12.0 [-Woverride-module] | |
1 warning generated. | |
% ./test | |
Hello, world! | |
% rustc --version | |
rustc 1.18.0-nightly (91ae22a01 2017-04-05) | |
% xcrun --toolchain XcodeDefault clang --version | |
Apple LLVM version 8.1.0 (clang-802.0.42) | |
Target: x86_64-apple-darwin16.6.0 | |
Thread model: posix | |
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment