about summary refs log tree commit diff
path: root/mk/llvm.mk
AgeCommit message (Collapse)AuthorLines
2017-02-06Delete the `mk` folderAlex Crichton-124/+0
This commit deletes the old build system located in the `mk` folder as it's now been obsoleted for two cycles and is replaced by rustbuild.
2016-11-13Make LLVM debuginfo option names consistentA.J. Gardner-1/+1
2016-11-12Add llvm debuginfo configure optionA.J. Gardner-0/+2
2016-10-14Add AppVeyor configuration to the repoAlex Crichton-19/+13
We hope to move to AppVeyor in the near future off of Buildbot + EC2. This adds an `appveyor.yml` configuration file which is ready to run builds on the auto branch. This is also accompanied with a few minor fixes to the build system and such to accomodate AppVeyor. The intention is that we're not switching over to AppVeyor entirely just yet, but rather we'll watch the builds for a week or so. If everything checks out then we'll start gating on AppVeyor instead of Buildbot!
2016-07-07llvm: allow cleaning LLVM's Visual Studio buildsBen Boeckel-0/+4
The Visual Studio generators create a `clean` target that we can use.
2016-07-07llvm, rt: build using the Ninja generator if availableBen Boeckel-2/+8
The Ninja generator generally builds much faster than make. It may also be used on Windows to have a vast speed improvement over the Visual Studio generators. Currently hidden behind an `--enable-ninja` flag because it does not obey the top-level `-j` or `-l` flags given to `make`.
2016-06-30mk: Don't consider LLVM done until it's doneAlex Crichton-2/+5
Currently if an LLVM build is interrupted *after* it creates the llvm-config binary but before it's done it puts us in an inconsistent state where we think LLVM is compiled but it's not actually. This tweaks our logic to only consider LLVM done building once it's actually done building. This should hopefully alleviate problems on the bots where if we interrupt at the wrong time it doesn't corrupt the build directory.
2016-06-27mk: Make some LLVM building support more robustAlex Crichton-1/+13
* Implement the clean-llvm target for those cases where makefiles are being used * Have all cross-compiled LLVMs depend on the **host** LLVM as they'll require the llvm-tablegen executable from there
2016-06-21Convert makefiles to build LLVM/compiler-rt with CMakeBrian Anderson-13/+3
2016-02-11rustc_llvm: Tweak how initialization is performedAlex Crichton-1/+1
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-1/+4
This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.
2016-02-01mk: fix some undefined variable warningsTamir Duberstein-4/+1
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-2/+2
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-3/+11
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-3/+3
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-2/+2
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-0/+2
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-0/+26
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-1/+1
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-3/+3
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-1/+2
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-7/+17
2014-10-29mk: Clean just one llvm build at a time. Closes #17852Brian Anderson-1/+1
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-1/+1
2014-04-17llvm: Add an option to statically link libstdc++Alex Crichton-4/+13
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-1/+1
2014-01-03mk: Fix llvmdeps.rs dependenciesBrian Anderson-3/+3
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-2/+1
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-0/+10
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-0/+2
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-2/+2
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-1/+1
2013-09-17The purpose of these headers is to fix issues with mingw v4.0, as described ↵Vadim Chugunov-1/+1
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-1/+11
2013-08-28Revert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"Brian Anderson-1/+1
This reverts commit 2c0f9bd35493def5e23f0f43ddeba54da9d788b4, reversing changes made to f8c4f0ea9c96218dbc81081799e77875fbb071de. Conflicts: src/rustllvm/RustWrapper.cpp
2013-08-22make: rm LLVM_BUILD_ENVDaniel Micay-1/+1
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-1/+3
2013-02-21mk: Split target triples into bulid triple + host triples + target triplesBrian Anderson-2/+2
For cross compiling to targets that don't want to build a compiler
2012-12-10Reliciense makefiles and testsuite. Yup.Graydon Hoare-0/+10
2012-03-26Remove duplicate definition.Graydon Hoare-5/+1
2012-02-10support a fast-make mode that avoids globbing into llvm and libuvGraydon Hoare-0/+5
2011-12-13build: Touch llvm-config after buildingBrian Anderson-1/+1
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-3/+7
2011-11-05Build LLVM with -fno-omit-frame-pointer on LinuxBrian Anderson-1/+1
2011-11-05Use $(MAKE) for recursive makeBrian Anderson-1/+1
2011-11-05Parameterize the LLVM build over the target triplesBrian Anderson-3/+15
2011-11-05LLVM build cleanupBrian Anderson-2/+4
2011-11-05Use LLVM directly from the build directoryBrian Anderson-1/+1
This will cut out the few seconds it takes to run make install.
2011-11-05Tie the LLVM build into oursBrian Anderson-0/+5
2011-11-05Add mk/llvm.mkBrian Anderson-0/+0