Commit Graph

18 Commits

Author SHA1 Message Date
Alex Crichton
cc2c812701 rustc_llvm: Require 3.9 for --link-static
Apparently stock Ubuntu 16.04 includes LLVM 3.8 which doesn't have this flag.
2016-11-09 09:12:38 -08:00
pweyck
bcfbbd8645 Force static linking of LLVM
Run llvm-config with "--link-static" if available, to force static linking of LLVM.
This option was added in LLVM 3.8.

Fixes #36854
See also: #36996
2016-11-06 16:33:34 +01:00
Srinivas Reddy Thatiparthy
9972d17ecf
run rustfmt on librustc_llvm folder 2016-10-22 18:37:35 +05:30
Brian Anderson
37abec06e5 Tidy 2016-09-30 14:02:51 -07:00
Jan-Erik Rediger
cb3f5799f4 Make the jsbackend an optional component 2016-09-30 14:02:41 -07:00
Jake Goulding
cc8727e675 Report which required build-time environment variable is not set 2016-09-25 12:18:09 -04:00
Jorge Aparicio
027eab2f87 initial support for s390x
A new target, `s390x-unknown-linux-gnu`, has been added to the compiler
and can be used to build no_core/no_std Rust programs.

Known limitations:

- librustc_trans/cabi_s390x.rs is missing. This means no support for
  `extern "C" fn`.
- No support for this arch in libc. This means std can be cross compiled
  for this target.
2016-08-26 21:05:50 -05:00
Cameron Hart
cbb88faad7 Merge branch 'master' into issue-30961 2016-08-06 15:50:48 +10:00
Ariel Ben-Yehuda
81df89fc2d remove the ExecutionEngine binding
the code has no tests and will just bitrot by itself.

this is a [breaking-change]
2016-08-03 15:08:47 +03:00
Cameron Hart
fc210a8994 Make rust build pass LLVM_RUSTLLVM to C++ compiler 2016-07-29 23:09:32 +10:00
Alex Crichton
0509be1f6b Update parsing llvm-config output
Now it prints full paths on MSVC, but we're only interested in path names
2016-07-29 10:29:59 +02:00
Zack M. Davis
d37edef9dd prefer if let to match with None => {} arm in some places
This is a spiritual succesor to #34268/8531d581, in which we replaced a
number of matches of None to the unit value with `if let` conditionals
where it was judged that this made for clearer/simpler code (as would be
recommended by Manishearth/rust-clippy's `single_match` lint). The same
rationale applies to matches of None to the empty block.
2016-07-03 16:27:02 -07:00
Srinivas Reddy Thatiparthy
593e1567ca run rustfmt on librustc_llvm folder 2016-05-29 14:57:34 +05:30
Andrea Canciani
c883463e94 Implement feature extraction from TargetMachine
Add the `LLVMRustHasFeature` function to check whether a
`TargetMachine` has a given feature.
2016-04-09 00:39:04 +02:00
Alex Crichton
6ccf03c843 rustbuild: Fix 32-bit Windows build
Unfortunately on i686-pc-windows-gnu LLVM's answer to `--host-target` is
`x86_64-pc-windows-gnu` even though we're building in a 32-bit shell as well as
compiling 32-bit libraries. For now use Cargo's `HOST` environment variable to
determine whether we're doing a cross compilation or not.
2016-03-14 14:56:48 -07:00
Alex Crichton
526640668d rustbuild: Enable cross-compiling LLVM
Currently all multi-host builds assume the the build platform can run the
`llvm-config` binary generated for each host platform we're creating a compiler
for. Unfortunately this assumption isn't always true when cross compiling, so we
need to handle this case.

This commit alters the build script of `rustc_llvm` to understand when it's
running an `llvm-config` which is different than the platform we're targeting for.
2016-02-28 10:50:13 -08:00
Alex Crichton
eac0a8bc30 bootstrap: Add directives to not double-link libs
Have all Cargo-built crates pass `--cfg cargobuild` and then add appropriate
`#[cfg]` definitions to all crates to avoid linking anything if this is passed.
This should help allow libstd to compile with both the makefiles and with Cargo.
2016-02-11 11:12:32 -08:00
Alex Crichton
4da4970767 bootstrap: Add build scripts for crates
This commits adds build scripts to the necessary Rust crates for all the native
dependencies. This is currently a duplication of the support found in mk/rt.mk
and is my best effort at representing the logic twice, but there may be some
unfortunate-and-inevitable divergence.

As a summary:

* alloc_jemalloc - build script to compile jemallocal
* flate - build script to compile miniz.c
* rustc_llvm - build script to run llvm-config and learn about how to link it.
  Note that this crucially (and will not ever) compile LLVM as that would take
  far too long.
* rustdoc - build script to compile hoedown
* std - script to determine lots of libraries/linkages as well as compile
  libbacktrace
2016-02-11 11:12:32 -08:00