Commit Graph

95 Commits

Author SHA1 Message Date
Brian Anderson
d2199e8716 Various fixes for x86_64 on linux
Configure LLVM correctly, use the right data layout, add the readlink
function back, fix C constants, etc.
2011-11-16 15:24:56 -08:00
Niko Matsakis
895822a61c more consistent naming convention 2011-11-16 15:16:41 -08:00
Niko Matsakis
cda2e07c37 reverse sense of check 2011-11-16 15:16:41 -08:00
Niko Matsakis
1456a23f72 make CFG_OPTIMIZE_CXX an option 2011-11-16 15:16:41 -08:00
Niko Matsakis
b55b8dc8bc add default for --debug-llvm option 2011-11-16 15:16:41 -08:00
Niko Matsakis
d77968dd7c finish up the shim approach 2011-11-16 15:16:40 -08:00
Niko Matsakis
34a5074432 fix handling of target-triples: use a comma to separate hosts 2011-11-08 21:11:47 -08:00
Brian Anderson
81a93eff93 configure: Handle absolute source paths when configuring LLVM 2011-11-05 13:23:11 -07:00
Brian Anderson
c0d220362f configure: Quote the git command 2011-11-05 13:23:11 -07:00
Brian Anderson
2e54a76737 Cleanup configure script 2011-11-05 13:23:11 -07:00
Brian Anderson
8e14d188de configure: Use i686 as the CPU type instead of i386
Seems to prevent the warning about linking bitcode with different triples.
2011-11-05 13:23:11 -07:00
Brian Anderson
4b6585c924 Parameterize the LLVM build over the target triples 2011-11-05 13:23:11 -07:00
Brian Anderson
a4e1a438f6 Cleanup LLVM build rules after rebase onto x64 changes 2011-11-05 13:23:11 -07:00
Brian Anderson
225f50ea96 Begin remove old LLVM configuration code 2011-11-05 13:23:11 -07:00
Brian Anderson
a0ff3db258 LLVM build cleanup 2011-11-05 13:23:11 -07:00
Brian Anderson
e47f410536 Use LLVM directly from the build directory
This will cut out the few seconds it takes to run make install.
2011-11-05 13:23:10 -07:00
Brian Anderson
26bb6716ef Tie the LLVM build into ours 2011-11-05 13:23:10 -07:00
Brian Anderson
bd67c70163 Call LLVM's configure script from ours 2011-11-05 13:23:10 -07:00
Brian Anderson
1a05274738 Add submodule management to configure script 2011-11-05 13:23:10 -07:00
Brian Anderson
7c3616057d configure: change --only-gcc to --enable-clang to make clang opt-in 2011-11-03 12:01:31 -07:00
Brian Anderson
1deaf97002 configure: cleanup 2011-11-02 16:26:22 -07:00
Brian Anderson
4151a3a67f configure: abort early on --help 2011-11-02 16:25:22 -07:00
Elly Jones
098cf43761 configure: support --target-triples and --only-gcc.
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-11-02 19:19:33 -04:00
Brian Anderson
0003a50e33 Change the error message when no LLVM is found 2011-11-02 16:10:40 -07:00
Elly Jones
234a4e58bd configure: add --llvm-root
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-11-02 16:10:40 -07:00
Elly Jones
a26554d97b configure: add support for --prefix=<prefix>
Signed-off-by: Elly Jones <elly@leptoquark.net>
2011-11-02 16:10:40 -07:00
Niko Matsakis
2bfa72ea42 virtualize rustllvm construction per target triple 2011-11-02 14:14:20 -07:00
Niko Matsakis
54af489e6f virtualize the runtime per target triple. 2011-11-02 14:14:20 -07:00
Niko Matsakis
93781297bf enable building with different target arch 2011-11-02 14:13:22 -07:00
Niko Matsakis
20946e6970 start going back to an i386 build 2011-11-02 14:13:22 -07:00
Brian Anderson
e0abcf3cd5 Document CFG_ONLY_GCC 2011-10-29 14:14:30 -07:00
Austin Seipp
83413b59a0 Prioritize GCC over Clang if CFG_ONLY_GCC is set.
On OS X I'd rather just be able to use GCC instead of the clang
builds I use/play with.
2011-10-29 14:11:23 -07:00
Brian Anderson
0c6200743c Add std docs to the build process 2011-10-27 14:59:22 -07:00
Brian Anderson
7ae757583a Begin documenting std and add doc generation using naturaldocs
Naturaldocs isn't really that great but it seems easier to get
something working than with doxygen, for which we would need to
convert rust code to something C++ish. We probably want to just
write a rustdoc utility at some point.
2011-10-25 18:01:52 -07:00
Austin Seipp
5ccf372755 Make sure $CFG_LLVM_CONFIG is set to $CFG_LLVM_ROOT/bin/llvm-config
On my machine I have two LLVM builds, one of regular HEAD and one
for Rust in ~/rust-llvm - by default CFG_LLVM_CONFIG is set to
/usr/local/bin/llvm-config which is wrong, because the probe for it
initially happens earlier in configure and succeeds (so putvar is called.)

This causes it to be emitted twice into the Makefile but the second
instance wins.
2011-10-23 01:07:40 -05:00
Brian Anderson
d77996a30f Add LLVM 3.1svn to supported versions 2011-10-15 15:53:18 -07:00
Brian Anderson
6e654564db Lots of build system cleanup and documentation
This splits mk/stageN.mk into host.mk and target.mk and makes
the build rules somewhat simpler - there's no more building from stageN
into stageN+1; instead we always build from stageN(host) to
stageN(target) then promote from stageN(target) to stageN+1(host).

Add a big honkin explaination right at the top of Makefile.in
2011-10-02 00:57:53 -07:00
Brian Anderson
9563c17d78 Have 'make install' do something close to useful
We'll copy the files to the right location. Still need to rpath.

Issue #529
2011-09-30 22:47:40 -07:00
Brian Anderson
821dd6c02c Change the directory for target libs
This pushes them down from stageN/lib/rustc/$(target) to
stageN/lib/rustc/$(target)/lib in order to make room for a target bin dir
2011-09-30 17:19:24 -07:00
Brian Anderson
76e8dd248c Fix configure script to use valgrind again 2011-09-26 16:17:22 -07:00
Erick Tryzelaar
5f066e06b9 Update to libuv commit 3ca382.
This patch changes libuv's gyp build system to
make it's own makefiles. To generate them for rust,
run these commands. They requires python 2.x to
work:

$ mkdir -p src/rt/libuv/build
$ svn co http://gyp.googlecode.com/svn src/rt/libuv/build/gyp
$ ./etc/src/gyp_uv
2011-09-23 16:53:06 -07:00
Graydon Hoare
18c6cc6371 More steps to arch-specific target libs (#474) 2011-09-23 10:50:16 -07:00
Graydon Hoare
13215809a8 Expand our own config.guess-like logic in configure, rather than only asking LLVM. We have to decide some things before we get an LLVM to ask. 2011-09-21 11:24:59 -07:00
Graydon Hoare
68d50b5928 Add target_triple to session::options. Use host triple by default, accept --target on command line. 2011-09-21 08:46:44 -07:00
Graydon Hoare
d5b2d62b20 Add build-system mechanisms for running benchmarks under 'perf'. 2011-09-13 15:06:41 -07:00
Graydon Hoare
7da64ae461 Munge libuv makefiles sufficiently to build out of tree. 2011-08-05 11:57:07 -07:00
Patrick Walton
ad925955d8 build: Don't error out if clang is too old. Instead, build with GCC. 2011-08-05 09:25:27 -07:00
Brian Anderson
0fbb6782bb Add dedicated pretty-printer tests with new pp-exact directive
Add a new src/test/pretty directory to hold just source files for testing the
pretty-printer.

Add a new pp-exact directive. When this directive is followed by a file name
it specifies a file containing the output that the pretty-printer should
generate. When pp-exact is not followed by a filename it says that the file
should pretty-print as written.
2011-08-02 10:39:13 -07:00
Brian Anderson
2573fe7026 The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.

A few main things happen here:

1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.

2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.

3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.

4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.

It adds two new features to the cfail/rfail/rpass/bench tests:

1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.

2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.

There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.

Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.

This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-24 15:34:34 -07:00
Graydon Hoare
ad954fcecc Add an NSIS script for building a win32 installer. Closes #522. 2011-07-23 12:27:06 -07:00