about summary refs log tree commit diff
path: root/src/libcompiler_builtins
AgeCommit message (Collapse)AuthorLines
2017-01-13Rollup merge of #38877 - jdub:patch-1, r=sanxiynGuillaume Gomez-4/+0
libcompiler_builtins: Don't build emutls.c Rather than improving the check, let's ditch emutls.c entirely.
2017-01-10Rollup merge of #38623 - alexcrichton:less-osx-warnings, r=aturonSeo Sanghyeon-6/+0
std: Remove unused objects from compiler-builtins We don't actually use trampoline_setup.c and all the `*tf3` business seems related to f80/f128 business. Specifically this'll fix some warnings showing up during builds on OSX.
2017-01-08libcompiler_builtins: Don't build emutls.cJeff Waugh-4/+0
Rather than improving the check, let's ditch emutls.c entirely.
2016-12-31Auto merge of #38482 - est31:i128, r=eddybbors-1/+784
i128 and u128 support Brings i128 and u128 support to nightly rust, behind a feature flag. The goal of this PR is to do the bulk of the work for 128 bit integer support. Smaller but just as tricky features needed for stabilisation like 128 bit enum discriminants are left for future PRs. Rebased version of #37900, which in turn was a rebase + improvement of #35954 . Sadly I couldn't reopen #37900 due to github. There goes my premium position in the homu queue... [plugin-breaking-change] cc #35118 (tracking issue)
2016-12-31Fix iabs and add some more testsest31-4/+13
2016-12-30std: Don't build docs for misc facade cratesAlex Crichton-0/+1
Retain the same behavior as stable. Closes #38319
2016-12-30Fix warning when compiling on 64 bit Linuxest31-7/+3
Code is much simpler now as well.
2016-12-30Further and hopefully final Windows fixesSimonas Kazlauskas-177/+148
2016-12-30More windows fixesest31-7/+15
2016-12-30Fix buildest31-7/+9
2016-12-30The windows special-cases only apply to x64Simonas Kazlauskas-31/+39
2016-12-30Fix a return typeSimonas Kazlauskas-1/+1
2016-12-30Tidyest31-1/+2
2016-12-30Fix another windows ABI mistakeest31-4/+30
...this time with the float intrinsics.
2016-12-30intrinsics: try to return everything via {u,i}128ret to match LLVMest31-38/+99
on suggestion by nagisa.
2016-12-30Tidyest31-4/+8
2016-12-30Port to wrapping_* and unchecked_* operationsest31-78/+118
Otherwise, we codegen panic calls which create problems with debug assertions turned on.
2016-12-30Remove unimplemented() functionest31-8/+2
2016-12-30libcompiler_builtins: don't codegen dead code call to eh_personalityest31-24/+31
There was a linker error on 32 bit platforms with optimisations turned off, complaining that there was an undefined reference to "rust_eh_personality", when compiling the rustc_const_math as stage1 artifact. Apparently the compiler_builtins crate includes a call to "rust_eh_personality". If compiled for 64 bits, this call doesn't appear, which explains why the linker error only happens on 32 bit platforms, and optimisations will get it removed on 32 bit as well. There were two origins of the call: 1. A for loop where apparently the compiler wasn't sure whether next() could panic or not, and therefore generated a landing pad for the worst case. The minimal reproducible example is "for _ in 0..sr { }". 2. A default impl of uabs where the compiler apparently wasn't sure either whether iabs() could panic or not. Many thanks to nagisa for contributing the fix. This commit also puts extern "C" to the intrinsics, as this is generally a good thing to do.
2016-12-30Try to fix some thingsest31-2/+2
* shift so that no panics are generated (otherwise results in linker error) * no_std as insurance to not get into issues with errors like "cannot satisfy dependencies so `rustc_i128` only shows up once" (pure guessing here, but it doesn't hurt...)
2016-12-30Always use Rust based intrinsics on Windowsest31-2/+4
The check inside compiler-rt file int_types.h to #define CRT_HAS_128BIT looks like: #if (defined(__LP64__) || defined(__wasm__)) && \ !(defined(__mips__) && defined(__clang__)) #define CRT_HAS_128BIT #endif Windows uses LLP64 instead of LP64, so it doesn't ship with the C based intrinsics. Also, add libcompiler_builtins to the list of crates that may have platform specific checks (like the ones we just added).
2016-12-30Fix warning on 64 bitest31-2/+2
2016-12-30intrinsics : uabs and iabsest31-13/+26
2016-12-30Fix intrinsics and expand testsest31-54/+68
2016-12-30Fix rebase falloutest31-1/+5
2016-12-30WIP intrinsicsSimonas Kazlauskas-0/+623
2016-12-26std: Remove unused objects from compiler-builtinsAlex Crichton-6/+0
We don't actually use trampoline_setup.c and all the `*tf3` business seems related to f80/f128 business. Specifically this'll fix some warnings showing up during builds on OSX.
2016-12-22Do not build emutls on RedoxJeremy Soller-1/+1
2016-11-28Auto merge of #38046 - rkruppe:fix-32bit-rustbuild, r=alexcrichtonbors-0/+1
Fix rustbuild on 32 bit Linux This is cherry-picked from #37817 which seems to be stalled and currently needs to be rebased anyway. r? @alexcrichton (who authored this change)
2016-11-28Define VISIBILITY_HIDDEN when compiling compiler-rtRobin Kruppe-0/+1
This is cherry-picked from #37817 which seems to be stalled and currently needs to be rebased anyway. r? @alexcrichton (who authored this change)
2016-11-26rustbuild: Add bench = false to std shim cratesUlrik Sverdrup-0/+1
2016-11-12rustc: Flag all builtins functions as hiddenAlex Crichton-0/+1
When compiling compiler-rt you typically compile with `-fvisibility=hidden` which to ensure that all symbols are hidden in shared objects and don't show up in symbol tables. This is important for these intrinsics being linked in every crate to ensure that we're not unnecessarily bloating the public ABI of Rust crates. This should help allow the compiler-builtins project with Rust-defined builtins start landing in-tree as well.
2016-09-30Don't build any native compiler-builtin components for emscriptenBrian Anderson-0/+6
2016-09-28Remove stage0 hacksBrian Anderson-2/+2
2016-09-25Report which required build-time environment variable is not setJake Goulding-1/+1
2016-09-13Link test to compiler builtins and make unstableAlex Crichton-1/+4
This commit fixes a test which now needs to explicitly link to the `compiler_builtins` crate as well as makes the `compiler_builtins` crate unstable.
2016-09-13rustc: Don't pass --whole-archive for compiler-builtinsAlex Crichton-4/+6
This flag is intended for rlibs included once, not rlibs that are repeatedly included.
2016-09-12crate-ify compiler-rt into compiler-builtinsJorge Aparicio-0/+433
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