about summary refs log tree commit diff
path: root/mk/platform.mk
AgeCommit message (Collapse)AuthorLines
2017-02-06Delete the `mk` folderAlex Crichton-250/+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-09-12crate-ify compiler-rt into compiler-builtinsJorge Aparicio-2/+0
libcompiler-rt.a is dead, long live libcompiler-builtins.rlib This commit moves the logic that used to build libcompiler-rt.a into a compiler-builtins crate on top of the core crate and below the std crate. This new crate still compiles the compiler-rt instrinsics using gcc-rs but produces an .rlib instead of a static library. Also, with this commit rustc no longer passes -lcompiler-rt to the linker. This effectively makes the "no-compiler-rt" field of target specifications a no-op. Users of `no_std` will have to explicitly add the compiler-builtins crate to their crate dependency graph *if* they need the compiler-rt intrinsics. Users of the `std` have to do nothing extra as the std crate depends on compiler-builtins. Finally, this a step towards lazy compilation of std with Cargo as the compiler-rt intrinsics can now be built by Cargo instead of having to be supplied by the user by some other method. closes #34400
2016-07-29[LLVM-3.9] Pass correct relocation model flagJan-Erik Rediger-1/+8
2016-05-05mk: Fix building with --enable-ccacheAlex Crichton-3/+3
We will no longer use `ccache` in the makefiles for our local dependencies like miniz, but they're so small anyway it doesn't really matter. Closes #33285
2016-04-28test: Move run-make tests into compiletestAlex Crichton-3/+3
Forcing them to be embedded in makefiles precludes being able to run them in rustbuild, and adding them to compiletest gives us a great way to leverage future enhancements to our "all encompassing test suite runner" as well as just moving more things into Rust. All tests are still Makefile-based in the sense that they rely on `make` being available to run them, but there's no longer any Makefile-trickery to run them and rustbuild can now run them out of the box as well.
2016-02-25mk: Move disable-jemalloc logic into makefilesAlex Crichton-0/+12
The `--disable-jemalloc` configure option has a failure mode where it will create a distribution that is not compatible with other compilers. For example the nightly for Linux will assume that it will link to jemalloc by default as an allocator for executable crates. If, however, a standard library is used which was built via `./configure --disable-jemalloc` then this will fail because the jemalloc crate wasn't built. While this seems somewhat reasonable as a niche situation, the same mechanism is used for disabling jemalloc for platforms that just don't support it. For example if the rumprun target is compiled then the sibiling Linux target *also* doesn't have jemalloc. This is currently a problem for our cross-build nightlies which build many targets. If rumprun is also built, it will disable jemalloc for all targets, which isn't desired. This commit moves the platform-specific disabling of jemalloc as hardcoded logic into the makefiles that is scoped per-platform. This way when configuring multiple targets **without the `--disable-jemalloc` option specified** all targets will get jemalloc as they should.
2016-02-01Revert "mk: fix some undefined variable warnings"Alex Crichton-17/+16
This reverts commit d03712977d7c913044f2b863269c4491d7fa7c36.
2016-02-01mk: fix some undefined variable warningsTamir Duberstein-16/+17
Some of this is scary stuff. Probably time to lint against this. Found with `make --warn-undefined-variables`.
2016-01-21mk: Remove all perf-related targetsAlex Crichton-17/+0
I don't believe these have been used at all recently, and I doubt many of them still work, so remove the stale support.
2015-12-31Rollup merge of #30365 - tamird:update-valgrind, r=pnkfelixSimonas Kazlauskas-3/+7
Since `darwin` is really `apple-darwin`, the valgrind-rpass tests were not actually being run with valgrind on mac before. Also, the `HOST` check was completely wrong. r? @alexcrichton
2015-12-20remove specific code for OpenBSD that define STDCPP_LIBDIR_RUSTFLAGSSébastien Marie-10/+0
it isn't the good way to process, as it makes conflicts when building rustc while another version of rustc in installed system-wide.
2015-12-18mk: actually run valgrind on x86_64-apple-darwinTamir Duberstein-3/+7
2015-11-20Set CFLAGS/LDFLAGS/etc according to Debian policyAngus Lees-0/+4
Debian wants to build all binaries with particular hardening flags. The Rust makefiles are inconsistent in which architectures they correctly include CFLAGS/etc from the enivoronment (see mk/cfg/*). This patch adds LDFLAGS, and then unconditionally prepends CFLAGS/LDFLAGS/etc to the build commands.
2015-11-17Rollup merge of #29876 - cardoe:i586-build-fix, r=alexcrichtonManish Goregaokar-1/+1
On distros that use i486 or i586 in their CHOST, Rust will fail to build because it is not handling i486 or i586 like i686 is handled. This changes the match to do work for all instances of i?86 instead of just i686. The Yocto Project still uses i586 as a target. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2015-11-16mk/platform: support i486 and i586 target CHOSTDoug Goldstein-1/+1
On distros that use i486 or i586 in their CHOST, Rust will fail to build because it is not handling i486 or i586 like i686 is handled. This changes the match to do work for all instances of i?86 instead of just i686. The Yocto Project still uses i586 as a target. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2015-11-11pass stdc++ library path after LVVM library pathSébastien Marie-3/+5
under openbsd, the library path of libstdc++ need to be explicit (due to the fact the default linker `cc` is gcc-4.2, and not gcc-4.9). but when a recent LLVM is installed, rustc compilation pikes the bad LLVM version (which live in /usr/local/lib, which is same directory of libestdc++.so for gcc-4.9). this patch move the libstdc++ path from RUST_FLAGS_<target> to special variable, and use it *after* LLVM_LIBDIR_RUSTFLAGS_<target> in arguments.
2015-11-07Make sure rsbegin.o and rsend.o get packaged with target lib artifacts.Vadim Chugunov-0/+3
Also, unified libc startup objects finding logic with that of the `-musl` target, since conceptually they were doing the same thing.
2015-09-20Pass libstdc++.so path to linker under OpenBSDSébastien Marie-0/+8
By default, the linker in use under OpenBSD is the linker of base, which don't include /usr/local/lib where libstdc++ of gcc-4.9 lives. We need to add this directory to linker-path-search (using -L). Search the path of libstdc++.a, which is a known name (libstdc++.so has SO_VERSION) in the same directory.
2015-08-11Register new snapshotsAlex Crichton-61/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-11Auto merge of #27518 - alexcrichton:msvc-builtin-llvm-ar, r=huonwbors-0/+3
This means that we no longer need to ship the `llvm-ar.exe` binary in the MSVC distribution, and after a snapshot we can remove a good bit of logic from the makefiles!
2015-08-10trans: Stop informing LLVM about dllexportAlex Crichton-2/+7
Rust's current compilation model makes it impossible on Windows to generate one object file with a complete and final set of dllexport annotations. This is because when an object is generated the compiler doesn't actually know if it will later be included in a dynamic library or not. The compiler works around this today by flagging *everything* as dllexport, but this has the drawback of exposing too much. Thankfully there are alternate methods of specifying the exported surface area of a dll on Windows, one of which is passing a `*.def` file to the linker which lists all public symbols of the dynamic library. This commit removes all locations that add `dllexport` to LLVM variables and instead dynamically generates a `*.def` file which is passed to the linker. This file will include all the public symbols of the current object file as well as all upstream libraries, and the crucial aspect is that it's only used when generating a dynamic library. When generating an executable this file isn't generated, so all the symbols aren't exported from an executable. To ensure that statically included native libraries are reexported correctly, the previously added support for the `#[linked_from]` attribute is used to determine the set of FFI symbols that are exported from a dynamic library, and this is required to get the compiler to link correctly.
2015-08-10trans: Specify `archive_format` for MSVCAlex Crichton-0/+3
This means that we no longer need to ship the `llvm-ar.exe` binary in the MSVC distribution, and after a snapshot we can remove a good bit of logic from the makefiles!
2015-08-10Remove morestack supportAlex Crichton-2/+1
This commit removes all morestack support from the compiler which entails: * Segmented stacks are no longer emitted in codegen. * We no longer build or distribute libmorestack.a * The `stack_exhausted` lang item is no longer required The only current use of the segmented stack support in LLVM is to detect stack overflow. This is no longer really required, however, because we already have guard pages for all threads and registered signal handlers watching for a segfault on those pages (to print out a stack overflow message). Additionally, major platforms (aka Windows) already don't use morestack. This means that Rust is by default less likely to catch stack overflows because if a function takes up more than one page of stack space it won't hit the guard page. This is what the purpose of morestack was (to catch this case), but it's better served with stack probes which have more cross platform support and no runtime support necessary. Until LLVM supports this for all platform it looks like morestack isn't really buying us much. cc #16012 (still need stack probes) Closes #26458 (a drive-by fix to help diagnostics on stack overflow)
2015-06-27mk: Add support for i686-pc-windows-msvcAlex Crichton-17/+1
This commit modifies the configure script and our makefiles to support building 32-bit MSVC targets. The MSVC toolchain is now parameterized over whether it can produce a 32-bit or 64-bit binary. The configure script was updated to export more variables at configure time, and the makefiles were rejiggered to selectively reexport the relevant environment variables for the applicable targets they're going to run for.
2015-06-25mk: Move logic out of MSVC's 64-bit cfg makefileAlex Crichton-0/+69
This logic applies to all MSVC targets, so instead refactor it into platform.mk so it can one day apply to 32-bit MSVC.
2015-05-26mk: Ensure LINK_$(1) is defined for all targetsAlex Crichton-0/+9
The changes scaled back in 4cc025d8 were a little too aggressive and broke a bunch of cross compilations by not defining the `LINK_$(1)` variable for all targets. This commit ensures that the variable is defined for all targets by defaulting it to the normal compiler if it's not already defined (it's only defined specially for MSVC). Closes #25723
2015-05-19mk: Don't add cross prefixes for MSVCAlex Crichton-0/+2
Currently the MSVC compilers don't have any cross prefixes and we're only able to make an MSVC compiler with a cross compile, so just avoid this logic on msvc for now.
2015-05-19mk: Add build system support for cl.exeAlex Crichton-2/+17
We have a number of support C/C++ files in Rust that we link into the standard library and other various locations, and these all need to be built with cl.exe instead of gcc.exe when targeting MSVC. This commit adds helper macros for this functionality to use different sets of programs/flags/invocations on MSVC than on GNU-like platforms.
2015-05-19mk: Correct names of installed libs on windowsAlex Crichton-0/+8
Previously libmorestack.a and libcompiler-rt.a were installed, but link.exe looks for morestack.lib and compiler-rt.lib by default, so we need to install these with the correct name
2015-05-19mk: Remove generation of .d filesAlex Crichton-8/+2
Looks like cl.exe doesn't support this and we're also barely using them anyway as we have very few header files and C code in general.
2015-05-12Scale back changes madeAlex Crichton-9/+9
2015-05-12Very hacky MSVC hacks.Ricky Taylor-8/+9
Conflicts: mk/platform.mk src/librustc/session/config.rs src/librustc_back/target/aarch64_apple_ios.rs src/librustc_back/target/aarch64_linux_android.rs src/librustc_back/target/arm_linux_androideabi.rs src/librustc_back/target/arm_unknown_linux_gnueabi.rs src/librustc_back/target/arm_unknown_linux_gnueabihf.rs src/librustc_back/target/armv7_apple_ios.rs src/librustc_back/target/armv7s_apple_ios.rs src/librustc_back/target/i386_apple_ios.rs src/librustc_back/target/i686_apple_darwin.rs src/librustc_back/target/i686_pc_windows_gnu.rs src/librustc_back/target/i686_unknown_dragonfly.rs src/librustc_back/target/i686_unknown_linux_gnu.rs src/librustc_back/target/mips_unknown_linux_gnu.rs src/librustc_back/target/mipsel_unknown_linux_gnu.rs src/librustc_back/target/mod.rs src/librustc_back/target/powerpc_unknown_linux_gnu.rs src/librustc_back/target/x86_64_apple_darwin.rs src/librustc_back/target/x86_64_apple_ios.rs src/librustc_back/target/x86_64_pc_windows_gnu.rs src/librustc_back/target/x86_64_unknown_dragonfly.rs src/librustc_back/target/x86_64_unknown_freebsd.rs src/librustc_back/target/x86_64_unknown_linux_gnu.rs src/librustc_back/target/x86_64_unknown_openbsd.rs src/librustc_llvm/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/trans/base.rs src/libstd/os.rs src/rustllvm/RustWrapper.cpp
2015-04-17Run valgrind with fair scheduling when availableTamir Duberstein-1/+2
Closes #3914.
2015-03-28Fix some typosVadim Petrochenkov-1/+1
2015-02-11PR review fixesDave Huseby-9/+9
2015-02-11bitrig integrationDave Huseby-9/+17
2015-01-11powerpc: Use toolchain assembler on powerRicho Healey-2/+2
2015-01-03Initial version of AArch64 support.Akos Kiss-3/+3
Adds AArch64 knowledge to: * configure, * make files, * sources, * tests, and * documentation.
2014-11-19mk/cfg: add .mk suffix on files to avoid "supprises" when backup files ↵Cody P Schafer-1/+1
(file~) are in the directory
2014-10-25split platform definitions out of mk/platform.mkCody P Schafer-464/+1
The goal here is to make it easier to add new platform definitions, especially when the additions are programmatic (ie: in build scripts).
2014-10-23Error if we should be able to Valgrind but can'tNick Cameron-0/+14
2014-10-01Remove libuv, gypAaron Turon-16/+0
This commit removes the libuv and gyp submodules, as well as all build infrastructure related to them. For more context, see the [runtime removal RFC](https://github.com/rust-lang/rfcs/pull/230) [breaking-change]
2014-09-12Remove build system support for i686-pc-mingw32 triple in favor if ↵Brian Anderson-30/+0
i686-w64-mingw32
2014-09-11mk: Fix defs for i686-w64-mingw32Brian Anderson-1/+3
2014-08-04Use gcc for cross-build linking, not g++.Vadim Chugunov-2/+2
2014-07-29Port Rust to DragonFlyBSDMichael Neumann-0/+27
Not included are two required patches: * LLVM: segmented stack support for DragonFly [1] * jemalloc: simple configure patches [1]: http://reviews.llvm.org/D4705
2014-07-23mk: Add space before line continuation backslashBirunthan Mohanathas-5/+5
2014-07-23mk: Remove extra whitespace before line continuation backslashesBirunthan Mohanathas-15/+15
2014-07-02Build rustc with /LARGEADDRESSAWARE on windows.Luqman Aden-0/+1
2014-06-24Added Mipsel architecture supportPawel Olzacki-1/+31