about summary refs log tree commit diff
path: root/src/librustc_llvm
AgeCommit message (Collapse)AuthorLines
2020-09-09Move `rustllvm` into `rustc_llvm`Vadim Petrochenkov-514/+0
2020-09-04Auto merge of #75655 - nielx:fix/haiku-llvm-libz, r=Mark-Simulacrumbors-1/+1
Disable zlib in LLVM on Haiku PR #72696 enabled the option LLVM_ENABLE_ZLIB for the LLVM builds. Like NetBSD and aarch64-apple-darwin (see PR #75500), the LLVM build system not explicitly linking to libz on these platforms cause issues. For Haiku, this meant the runtime loader complaining about undefined symbols..
2020-09-01Link to zlib while cross-compiling LLVM on HaikuNiels Sascha Reedijk-1/+1
PR #72696 enabled the option LLVM_ENABLE_ZLIB for the LLVM builds. On Haiku, zlib is linked as a shared library. When cross-compiling LLVM, rustbuild should be instructed to explicitly linking to libz.
2020-08-30cleanup: Remove duplicate library names from `Cargo.toml`sVadim Petrochenkov-1/+0
2020-08-25Enable zlib for NetBSDMateusz Mikuła-0/+2
2020-08-19Fix windows-gnu host cross-compilationMateusz Mikuła-0/+9
2020-07-22Rollup merge of #74643 - petrochenkov:noenvrerun, r=Mark-SimulacrumManish Goregaokar-15/+10
build: Remove unnecessary `cargo:rerun-if-env-changed` annotations ... and a couple of related cleanups. rustc and cargo now track the majority of env var dependencies automatically (https://github.com/rust-lang/cargo/pull/8421), so the annotations are no longer necessary.
2020-07-22build: Harden env var tracking in build scriptsVadim Petrochenkov-14/+10
2020-07-22build: Remove unnecessary `build = "build.rs"` annotationsVadim Petrochenkov-1/+0
2020-07-22build: Remove unnecessary `cargo:rerun-if-env-changed` annotationsVadim Petrochenkov-1/+1
2020-07-20Update dependencies that have knowledge about aarch64-apple-darwinJake Goulding-2/+2
2020-07-17Generating the coverage mapRich Kadel-2/+17
rustc now generates the coverage map and can support (limited) coverage report generation, at the function level. Example: $ BUILD=$HOME/rust/build/x86_64-unknown-linux-gnu $ $BUILD/stage1/bin/rustc -Zinstrument-coverage \ $HOME/rust/src/test/run-make-fulldeps/instrument-coverage/main.rs $ LLVM_PROFILE_FILE="main.profraw" ./main called $ $BUILD/llvm/bin/llvm-profdata merge -sparse main.profraw -o main.profdata $ $BUILD/llvm/bin/llvm-cov show --instr-profile=main.profdata main 1| 1|pub fn will_be_called() { 2| 1| println!("called"); 3| 1|} 4| | 5| 0|pub fn will_not_be_called() { 6| 0| println!("should not have been called"); 7| 0|} 8| | 9| 1|fn main() { 10| 1| let less = 1; 11| 1| let more = 100; 12| 1| 13| 1| if less < more { 14| 1| will_be_called(); 15| 1| } else { 16| 1| will_not_be_called(); 17| 1| } 18| 1|}
2020-07-16apply bootstrap cfgsMark Rousskov-1/+1
2020-07-11RISC-V GNU/Linux as host platformmsizanoen1-0/+5
2020-06-26Rollup merge of #73507 - mati865:cleanup-mingw-llvm-linkage, r=matthewjasperManish Goregaokar-4/+2
Cleanup MinGW LLVM linkage workaround LLVM correctly passes `uuid` for a long time, GCC unwinding library (either static or dynamic) comes from [windows_gnu_base](https://github.com/rust-lang/rust/blob/06e47688bf15d0215edbe05b21603062f6d2eb5d/src/librustc_target/spec/windows_gnu_base.rs).
2020-06-24lints: add `improper_ctypes_definitions`David Wood-0/+1
This commit adds a new lint - `improper_ctypes_definitions` - which functions identically to `improper_ctypes`, but on `extern "C" fn` definitions (as opposed to `improper_ctypes`'s `extern "C" {}` declarations). Signed-off-by: David Wood <david@davidtw.co>
2020-06-19Cleanup MinGW LLVM linkage workaroundMateusz Mikuła-4/+2
2020-06-09[AVR] Add AVR platform supportJake Goulding-0/+9
2020-05-02Don't skip building LLVM if already builtMark Rousskov-1/+1
2020-04-11Don't emit rerun-if-changed on llvm-config if using system LLVMLuca Barbieri-10/+20
The code was broken because it printed "llvm-config" instead of the absolute path to the llvm-config executable, causing Cargo to always rebuild librustc_llvm if using system LLVM. Also, it's not the build system's job to rebuild when a system library changes, so we simply don't emit "rerun-if-changed" if a path to LLVM was not explicitly provided.
2020-03-23rustc_llvm: don't use -g when LLVM_NDEBUG is set.Eduard-Mihai Burtescu-0/+1
2020-02-27use char instead of &str for single char patternsMatthias Krüger-1/+1
2020-01-14Better support for cross compilation on Windows.Daniel Frampton-4/+6
2019-12-22Format the worldMark Rousskov-143/+161
2019-12-12Fix weird implicit dependency between rustllvm and rustc_codegen_llvmAaron Hill-0/+23
rustllvm relies on the `LLVMRustStringWriteImpl` symbol existing, but this symbol was previously defined in a *downstream* crate (rustc_codegen_llvm, which depends on rustc_llvm. While this somehow worked under the old 'separate bootstrap step for codegen' scheme, it meant that rustc_llvm could not actually be built by itself, since it relied linking to the downstream rustc_codegen_llvm crate. Now that librustc_codegen_llvm is just a normal crate, we actually try to build a standalone rustc_llvm when we run tests. This commit moves `LLVMRustStringWriteImpl` into rustc_llvm (technically the rustllvm directory, which has its contents built by rustc_llvm). This ensures that we can build each crate in the graph by itself, without requiring that any downstream crates be linked in as well.
2019-10-30Statically link libstdc++ on windows-gnuMateusz Mikuła-1/+5
2019-09-04fix a few typos in commentsGuanqun Lu-3/+3
2019-08-17Rollup merge of #63621 - jgalenson:dndebug, r=alexcrichtonMazdak Farrokhzad-0/+4
Modify librustc_llvm to pass -DNDEBUG while compiling. Currently, librustc_llvm builds are not reproducible because the LLVM files it compiles use the debug version of llvm_unreachable, which uses __FILE__. To fix this, we propagate NDEBUG from bootstrap if applicable and use it when compiling librustc_llvm. r? @alexcrichton
2019-08-15Modify librustc_llvm to pass -DNDEBUG while compiling.Joel Galenson-0/+4
Currently, librustc_llvm builds are not reproducible because the LLVM files it compiles use the debug version of llvm_unreachable, which uses __FILE__. To fix this, we propagate NDEBUG from bootstrap if applicable and use it when compiling librustc_llvm.
2019-08-15add sparc64-unknown-openbsd targetSébastien Marie-2/+5
on OpenBSD, some architectures relies on libc++ (from LLVM) and some others on libestdc++ (particular version of libstdc++ from GCC). sparc64-unknown-openbsd needs libestdc++ and libgcc (as x86_64 some years ago). Reintroduce the support of them for openbsd, only for sparc64 arch. Some others architectures on OpenBSD could use them too.
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-26Rollup merge of #62907 - nikic:msp430-asmparser, r=alexcrichtonMazdak Farrokhzad-0/+6
Initialize the MSP430 AsmParser Hopefully fixes #59077. r? @alexcrichton
2019-07-24Initialize the MSP430 AsmParser if availableNikita Popov-0/+6
2019-07-20Don't link mcjit/interpreter LLVM componentsNikita Popov-10/+3
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-4/+0
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-06-10Pass LLVM linker flags to librustc_llvm buildPetr Hosek-0/+15
Some -L and -l flags may be needed even when building librustc_llvm, for example when using static libc++ on Linux we may need to manually specify the library search path and -ldl -lpthread as additional link dependencies. We pass LLVM linker flags from config to librustc_llvm build to make sure these cases are handled.
2019-02-10Revert removed #![feature(nll)]Taiki Endo-0/+1
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-07librustc_llvm => 2018Taiki Endo-4/+2
2019-01-26Workaround presence of LLVM library in stage0/libMark Rousskov-0/+2
This commit works around the newly-introduced LLVM shared library. This is needed such that llvm-config run from librustc_llvm's build script can correctly locate it's own LLVM, not the one in stage0/lib. The LLVM build system uses the DT_RUNPATH/RUNPATH header within the llvm-config binary, which we want to use, but because Cargo always adds the host compiler's "libdir" (stage0/lib in our case) to the dynamic linker's search path, we weren't properly finding the freshly-built LLVM in llvm/lib. By restoring the environment variable setting the search path to what bootstrap sees, the problem is resolved and librustc_llvm correctly links and finds the appropriate LLVM. Several run-make-fulldeps tests are also updated with similar handling.
2019-01-25librustc_llvm: default to libc++ for darwinJosh Stone-0/+2
2019-01-07Rollup merge of #57369 - petrhosek:llvm-libcxx, r=alexcrichtonPietro Albini-0/+3
Provide the option to use libc++ even on all platforms This is the default on platforms which use libc++ as the default C++ library but this option allows using libc++ on others as well.
2019-01-05Provide the option to use libc++ even on all platformsPetr Hosek-0/+3
This is the default on platforms which use libc++ as the default C++ library but this option allows using libc++ on others as well.
2019-01-02bootstrap: Link LLVM as a dylib with ThinLTOAlex Crichton-0/+4
When building a distributed compiler on Linux where we use ThinLTO to create the LLVM shared object this commit switches the compiler to dynamically linking that LLVM artifact instead of statically linking to LLVM. The primary goal here is to reduce CI compile times, avoiding two+ ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll reuse the one ThinLTO step done by LLVM's build itself. Lots of discussion about this change can be found [here] and down. A perf run will show whether this is worth it or not! [here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334
2018-12-25Remove licensesMark Rousskov-20/+0
2018-12-25Revert "Rollup merge of #56944 - alexcrichton:less-thin2, r=michaelwoerister"kennytm-4/+0
This reverts commit f1051b574c26e20608ff26415a3dddd13f140925, reversing changes made to 833e0b3b8a9f1487a61152ca76f7f74a6b32cc0c.
2018-12-17bootstrap: Link LLVM as a dylib with ThinLTOAlex Crichton-0/+4
When building a distributed compiler on Linux where we use ThinLTO to create the LLVM shared object this commit switches the compiler to dynamically linking that LLVM artifact instead of statically linking to LLVM. The primary goal here is to reduce CI compile times, avoiding two+ ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll reuse the one ThinLTO step done by LLVM's build itself. Lots of discussion about this change can be found [here] and down. A perf run will show whether this is worth it or not! [here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334
2018-12-12Bump to 1.33.0Alex Crichton-2/+2
* Update bootstrap compiler * Update version to 1.33.0 * Remove some `#[cfg(stage0)]` annotations Actually updating the version number is blocked on updating Cargo
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-10-23Revert "rustc: Fix (again) simd vectors by-val in ABI"Alex Crichton-3/+1
This reverts commit 3cc8f738d4247a9b475d8e074b621e602ac2b7be.