summaryrefslogtreecommitdiff
path: root/mk/llvm.mk
AgeCommit message (Collapse)Author
2016-02-11rustc_llvm: Tweak how initialization is performedAlex Crichton
Refactor a bit to have less repetition and #[cfg] and try to bury it all inside of a macro.
2016-02-01Revert "mk: fix some undefined variable warnings"Alex Crichton
This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.
2016-02-01mk: fix some undefined variable warningsTamir Duberstein
Some of this is scary stuff. Probably time to lint against this. Found with `make --warn-undefined-variables`.
2015-12-16mk: Use the right llvmdeps.rs file for cross buildAlex Crichton
It looks like #27937 accidentally switched the llvmdeps file from the target to the host by accident, so be sure to use the right llvmdeps file which is built for the target when building rustc_llvm
2015-12-13Better support for `--llvm-root`.Richard Diamond
This handles cases when the LLVM used isn't configured will the 'usual' targets. Also, cases where LLVM is shared are also handled (ie with `LD_LIBRARY_PATH` etc).
2015-11-13Escape some variables in llvm.mkWilliam Throwe
The important one is $(MAKE). make handles recipes containing the literal string "$(MAKE)" specially, so it is important to make sure it isn't evaluated until recipe invocation time.
2015-09-18add support for non-standard name of stdc++ librarySébastien Marie
it makes rustc compatible with gcc installation that are using `--program-transform-name' configure flag (on OpenBSD for example). - detects at configure the name of stdc++ library on the system - use the detected name in llvm makefile (with enable-static-stdcpp), and pass it to mklldeps.py - generate mklldeps.rs using this detected name note that CFG_STDCPP_NAME is about stdc++ name, not about libc++. If using libc++, the default name will be `stdc++', but it won't be used when linking.
2015-05-19mk: Add the ability to depend on native LLVM toolsAlex Crichton
The compiler will require that `llvm-ar.exe` be available for MSVC-targeting builds (more comments on this soon), so this commit adds support for targets to depend on LLVM tools. The `core` library for MSVC depends on `llvm-ar.exe` which will be copied into place for the target before the compiler starts to run. Note that these targets all depend on `llvm-config.exe` to ensure that they're built before they're attempted to be copied.
2015-05-19mk: Enable building LLVM targeting MSVCAlex Crichton
This commit modifies the makefiles to enable building LLVM with cmake and Visual Studio to generate an LLVM that targets MSVC. Rust's configure script requires cmake to be installed when targeting MSVC and will configure LLVM with cmake instead of the normal `./configure` script LLVM provides. The build will then run cmake to execute the build instead of the normal `make`. Currently `make clean-llvm` isn't supported on MSVC as I can't figure out how to run a "clean" target for the Visual Studio files.
2015-05-19mk: Fix native LLVM deps for cross-host buildsAlex Crichton
We use a script called `mklldeps.py` to run `llvm-config` to generate a list of LLVM libraries and native dependencies needed by LLVM, but all cross-compiled LLVM builds were using the *host triple's* `llvm-config` instead of the *target's* `llvm-config`. This commit alters this to require the right `llvmdeps.rs` to be generated which will run the correct `llvm-config`.
2015-03-12Avoid passing -L "" to rustc.Ryan Prichard
Currently, target.mk passes -L "" when LLVM_STDCPP_LOCATION_$(2) is empty. This fixes #23287.
2015-03-03Make build timestamp files robust in face of concurrent source modification.Felix S. Klock II
Strategy: If the end goal is to touch e.g. `stamp.std`, then we first touch `stamp.std.start_time` before doing anything else. Then when the receipe finishes, we touch `stamp.std` using the timestamp from `stamp.std.start_time` as the reference time, and remove `stamp.std.start_time`. Fix #6518.
2014-11-25Don't use the same llvmdeps.rs for every host.Richard Diamond
2014-10-29mk: Clean just one llvm build at a time. Closes #17852Brian Anderson
When building for multiple targets, the initial 'make' invocation always fails. The missing build stamp causes clean-llvm to be invoked, but clean-llvm cleans *all* llvm builds. So what happens is that 1) all llvm's are cleaned (a no-op), 2) llvm-${target1} builds, 3) all llvm's are cleaned (deleting llvm-${target1}), 4) llvm-${target2} is built, 5) the remaining build for ${target1} fails because llvm does not exist. This makes the clean operation only clean the correct llvm build. Should greatly reduce bot failures.
2014-07-14Move llvm bindings to their own crateBrian Anderson
2014-04-17llvm: Add an option to statically link libstdc++Alex Crichton
The goal of the snapshot bots is to produce binaries which can run in as many locations as possible. Currently we build on Centos 6 for this reason, but with LLVM's update to C++11, this reduces the number of platforms that we could possibly run on. This adds a --enable-llvm-static-stdcpp option to the ./configure script for Rust which will enable building a librustc with a static dependence on libstdc++. This normally isn't necessary, but this option can be used on the snapshot builders in order to continue to make binaries which should be able to run in as many locations as possible.
2014-01-15Only build LLVM tools Rust needs.Vadim Chugunov
2014-01-03mk: Fix llvmdeps.rs dependenciesBrian Anderson
In a multi-host build the mklldeps.py tool is getting called before all the llvm-configs are built. I am not actually sure the cause. I had convinced myself that DEF_LLVM_RULES needed to be called before the llvmdeps.rs rule, but now looking at it again I can't see why.
2013-12-18mklldeps.py: Write to file instead of printklutzy
It seems that msys automatically converts `\n` to `\r\n` on pipe redirection, which causes `make tidy` failure.
2013-12-06Link rustllvm statically, and distribute a static snapshotAlex Crichton
In order to keep up to date with changes to the libraries that `llvm-config` spits out, the dependencies to the LLVM are a dynamically generated rust file. This file is now automatically updated whenever LLVM is updated to get kept up-to-date. At the same time, this cleans out some old cruft which isn't necessary in the makefiles in terms of dependencies. Closes #10745 Closes #10744
2013-12-05Remove unused upcallsAlex Crichton
The main one removed is rust_upcall_reset_stack_limit (continuation of #10156), and this also removes the upcall_trace function. The was hidden behind a `-Z trace` flag, but if you attempt to use this now you'll get a linker error because there is no implementation of the 'upcall_trace' function. Due to this no longer working, I decided to remove it entirely from the compiler (I'm also a little unsure on what it did in the first place).
2013-11-30Fix double slashes in make paths.Chris Morgan
CFG_BUILD_DIR, CFG_LLVM_SRC_DIR and CFG_SRC_DIR all have trailing slashes, by definition, so this is correct.
2013-10-29support for GNU configure syntaxHeather
2013-09-17The purpose of these headers is to fix issues with mingw v4.0, as described ↵Vadim Chugunov
in #9246. This works by adding this directory to GCC include search path before mingw system headers directories, so we can intercept their inclusions and add missing definitions without having to modify files in mingw/include.
2013-09-03Move the llvm auto-clean stamp into $target/llvmAlex Crichton
2013-08-28Revert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"Brian Anderson
This reverts commit 2c0f9bd35493def5e23f0f43ddeba54da9d788b4, reversing changes made to f8c4f0ea9c96218dbc81081799e77875fbb071de. Conflicts: src/rustllvm/RustWrapper.cpp
2013-08-22make: rm LLVM_BUILD_ENVDaniel Micay
using this to turn off the frame pointers isn't needed, and doesn't actually work right now because the reference to it omits the target triple
2013-08-04Try to fix a periodic windows build failure due to broken rwildcard macroBrian Anderson
2013-02-21mk: Split target triples into bulid triple + host triples + target triplesBrian Anderson
For cross compiling to targets that don't want to build a compiler
2012-12-10Reliciense makefiles and testsuite. Yup.Graydon Hoare
2012-03-26Remove duplicate definition.Graydon Hoare
2012-02-10support a fast-make mode that avoids globbing into llvm and libuvGraydon Hoare
2011-12-13build: Touch llvm-config after buildingBrian Anderson
llvm-config is the file we base our LLVM build rule on, but rebuilding LLVM doesn't always rebuild it, so touch.
2011-11-25build: Create a better definition of LLVM depsBrian Anderson
2011-11-05Build LLVM with -fno-omit-frame-pointer on LinuxBrian Anderson
2011-11-05Use $(MAKE) for recursive makeBrian Anderson
2011-11-05Parameterize the LLVM build over the target triplesBrian Anderson
2011-11-05LLVM build cleanupBrian Anderson
2011-11-05Use LLVM directly from the build directoryBrian Anderson
This will cut out the few seconds it takes to run make install.
2011-11-05Tie the LLVM build into oursBrian Anderson
2011-11-05Add mk/llvm.mkBrian Anderson