Commit Graph

156 Commits

Author SHA1 Message Date
Ian Daniher f568720c99 enable mutex lowering and hardware floating point on gnueabihf. closes #10482 2014-03-12 16:55:28 -04:00
Luqman Aden 615536a265 mk: Remove old flags to llc for arm. 2014-02-15 20:08:33 -05:00
bors 92c5738aae auto merge of #12207 : alexcrichton/rust/up-llvm, r=sfackler
Includes an upstream commit by pcwalton to improve codegen of our enums getting
moved around.

This also introduces a new commit on top of our stack of patches to fix a mingw32 build issue. I have submitted the patch upstream: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140210/204653.html

I verified that this builds on the try bots, which amazes me because I think that c++11 is turned on now, but I guess we're still lucky!

Closes #10613 (pcwalton's patch landed)
Closes #11992 (llvm has removed these options)
2014-02-14 07:26:40 -08:00
Alex Crichton 804955f79a Upgrade LLVM
Includes an upstream commit by pcwalton to improve codegen of our enums getting
moved around.
2014-02-14 07:22:49 -08:00
Luqman Aden ffdda22aa2 mk: Fix non-android cross builds. 2014-02-13 18:11:23 -05:00
Alex Crichton 071ee96277 Consolidate codegen-related compiler flags
Move them all behind a new -C switch. This migrates some -Z flags and some
top-level flags behind this -C codegen option.

The -C flag takes values of the form "-C name=value" where the "=value" is
optional for some flags.

Flags affected:

* --llvm-args           => -C llvm-args
* --passes              => -C passes
* --ar                  => -C ar
* --linker              => -C linker
* --link-args           => -C link-args
* --target-cpu          => -C target-cpu
* --target-feature      => -C target-fature
* --android-cross-path  => -C android-cross-path
* --save-temps          => -C save-temps
* --no-rpath            => -C no-rpath
* -Z no-prepopulate     => -C no-prepopulate-passes
* -Z no-vectorize-loops => -C no-vectorize-loops
* -Z no-vectorize-slp   => -C no-vectorize-slp
* -Z soft-float         => -C soft-float
* -Z gen-crate-map      => -C gen-crate-map
* -Z prefer-dynamic     => -C prefer-dynamic
* -Z no-integrated-as   => -C no-integrated-as

As a bonus, this also promotes the -Z extra-debug-info flag to a first class -g
or --debuginfo flag.

* -Z debug-info         => removed
* -Z extra-debug-info   => -g or --debuginfo

Closes #9770
Closes #12000
2014-02-10 00:50:39 -08:00
bors 1e23c5c051 auto merge of #11879 : thestinger/rust/frame-pointer, r=alexcrichton
This is still used for Rust code (`Options.NoFramePointerElim = true`).
2014-01-29 13:36:40 -08:00
Daniel Micay 17c42db6d1 mk: remove -fno-omit-frame-pointer
This is still used for Rust code (`Options.NoFramePointerElim = true`).
2014-01-28 09:31:59 -05:00
Salem Talha cc61fc0994 Removed all instances of XXX in preparation for relaxing of FIXME rule 2014-01-26 14:42:53 -05:00
Vadim Chugunov cefb2c7e45 Fix ARM unwinding. 2014-01-03 23:34:15 -08:00
bors f73c9c9bbc auto merge of #10949 : fabricedesre/rust/no-gnustl, r=cmr 2013-12-14 09:26:27 -08:00
Fabrice Desré 57c6281649 Remove dependency on gnustl_shared for android builds 2013-12-12 23:06:59 -08:00
Richard Diamond fa36de339a Fixed a minor typo. 2013-12-10 18:52:50 -06:00
Felix S. Klock II 5e00d5c790 Make the ccache-free case look like the ccache case.
This fixes a problem with `make check` clang -Werror failing due to an
unused -Llib arg.
2013-12-02 19:25:14 +01:00
Alex Crichton e338a4154b Add generation of static libraries to rustc
This commit implements the support necessary for generating both intermediate
and result static rust libraries. This is an implementation of my thoughts in
https://mail.mozilla.org/pipermail/rust-dev/2013-November/006686.html.

When compiling a library, we still retain the "lib" option, although now there
are "rlib", "staticlib", and "dylib" as options for crate_type (and these are
stackable). The idea of "lib" is to generate the "compiler default" instead of
having too choose (although all are interchangeable). For now I have left the
"complier default" to be a dynamic library for size reasons.

Of the rust libraries, lib{std,extra,rustuv} will bootstrap with an
rlib/dylib pair, but lib{rustc,syntax,rustdoc,rustpkg} will only be built as a
dynamic object. I chose this for size reasons, but also because you're probably
not going to be embedding the rustc compiler anywhere any time soon.

Other than the options outlined above, there are a few defaults/preferences that
are now opinionated in the compiler:

* If both a .dylib and .rlib are found for a rust library, the compiler will
  prefer the .rlib variant. This is overridable via the -Z prefer-dynamic option
* If generating a "lib", the compiler will generate a dynamic library. This is
  overridable by explicitly saying what flavor you'd like (rlib, staticlib,
  dylib).
* If no options are passed to the command line, and no crate_type is found in
  the destination crate, then an executable is generated

With this change, you can successfully build a rust program with 0 dynamic
dependencies on rust libraries. There is still a dynamic dependency on
librustrt, but I plan on removing that in a subsequent commit.

This change includes no tests just yet. Our current testing
infrastructure/harnesses aren't very amenable to doing flavorful things with
linking, so I'm planning on adding a new mode of testing which I believe belongs
as a separate commit.

Closes #552
2013-11-29 18:36:13 -08:00
Luqman Aden ae5a13d643 Use CXX not CC for linking. 2013-11-23 04:49:16 -05:00
Luqman Aden 84403eb897 Remove sjlj stuff from rust_upcall and don't pass -Werror to libuv. 2013-11-22 22:04:36 -08:00
Luqman Aden a2c111abde mk: Get rid of redundant LIBUV_FLAGS. 2013-11-22 20:39:58 -05:00
Luqman Aden 6820ed4dcf Fix up mingw64 target. 2013-11-22 20:39:58 -05:00
Alex Crichton 508b7b996e Move runtime files to C instead of C++
Explicitly have the only C++ portion of the runtime be one file with exception
handling. All other runtime files must now live in C and be fully defined in C.
2013-11-18 21:45:58 -08:00
kud1ing 2a333ed088 Fixes for compilation to iOS:
- remove /usr/include from the include path since the iOS SDK provides the correct version
- `_NSGetEnviron()` is private and not available on iOS
- `.align` without an argument is not allowed with the Apple tools. 2^2 should be the default alignment
- ignore error messages for XCode < 5
- pass include path to libuv
2013-11-06 22:11:09 +01:00
bors fa8a202858 auto merge of #10203 : kud1ing/rust/ios, r=alexcrichton
This is based on the work by @dobkeratops, updated and extended to work for Xcode 5.

This gets you going. I will add separate PRs for compilation/linking fixes.
See also https://github.com/mozilla/rust/wiki/Doc-building-for-ios
2013-11-01 02:26:23 -07:00
kud1ing 5864ad9ab1 add target triple arm-apple-darwin 2013-10-31 22:43:59 +01:00
Heather 8a593a8bdb support for GNU configure syntax 2013-10-29 16:22:08 -07:00
Mark Rowe fd8c06e7b5 Fix unwinding on OS X 10.9.
OS X 10.9's linker has a bug that results in it failing to preserve
DWARF unwind information when passed the -no_compact_unwind flag.
This flag is passed on OS X because the unwind information for
__morestack cannot be represented by the compact unwind format.

We can work around this problem by using a more targeted approach
to disabling compact unwind information. The OS X linker looks for
a particular pattern in the DWARF unwind information and will not
attempt to convert the unwind information to the compact format.
The pattern in question is the return address register being saved
twice to the same location.

Fixes #6849.
2013-10-22 03:02:25 -07:00
Alex Crichton 6d8330afb6 Use __morestack to detect stack overflow
This commit resumes management of the stack boundaries and limits when switching
between tasks. This additionally leverages the __morestack function to run code
on "stack overflow". The current behavior is to abort the process, but this is
probably not the best behavior in the long term (for deails, see the comment I
wrote up in the stack exhaustion routine).
2013-10-19 09:43:31 -07:00
Daniel Micay f766acad62 drop the linenoise library
Closes #5038
2013-10-16 22:57:51 -04:00
Alex Crichton d858360483 Build libuv/jemalloc only once (not per stage)
Reorganize the makefiles to stop building these once per stage because there's
no need to do this at all.

Closes #7002
2013-10-08 14:26:56 -07:00
Jyun-Yan You 350b5438cd add -Z soft-float option
This change adds -Z soft-float option for generating
software floating point library calls.
It also implies using soft float ABI, that is the same as llc.

It is useful for targets that have no FPU.
2013-10-01 11:19:18 +08:00
bors b43ee6cd2e auto merge of #9277 : crabtw/rust/mips, r=brson
This patch fixes some errors of MIPS target, however, MIPS C ABI is still broken. I will send another PR to fix the problem.

Because MIPS target has no "generic" CPU name, I add --target-cpu and --target-feature to RUST_FLAGS. In order to workaround the "compact frame descriptions incompatible with DWARF2 .eh_frame" problem, the linker I used is CXX but not CC.
2013-09-18 09:15:56 -07:00
Jyun-Yan You d11f746cc1 fix compilation errors of mips target 2013-09-18 10:10:32 +08:00
Vadim Chugunov c3fd430603 The purpose of these headers is to fix issues with mingw v4.0, as described 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-17 01:06:01 -07:00
Brian Anderson 4c49a3d8cd mk: Fix valgrinding with jemalloc
This fixes valgrind on the linux snapshot bot. The command added here
makes us require a fairly recent valgrind.
2013-09-16 15:29:46 -07:00
Brian Anderson 3801534d10 Revert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"
This reverts commit 2c0f9bd354, reversing
changes made to f8c4f0ea9c.

Conflicts:
	src/rustllvm/RustWrapper.cpp
2013-08-28 19:59:52 -07:00
Daniel Micay 0ac02e7c4f make: stop disabling frame pointer elimination
We currently have no need for the frame pointers on any platform. They
may eventually be needed on platforms without an equivalent to the DWARF
call frame information to walk the stack in the garbage collector.

Closes #7477
2013-08-22 20:49:48 -04:00
Daniel Micay db14469e21 make: rm LLVM_BUILD_ENV
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-22 20:43:50 -04:00
Luqman Aden 9c39992021 Add support for vanilla linux on arm. 2013-08-04 19:28:06 -04:00
Luqman Aden 5007fb2d4d Add x64 windows to platform.mk and mingw64 header fixes. 2013-07-03 23:33:59 -04:00
Brian Anderson 829b5de998 mk: Bulid rustrt with -pthread instead of -lpthread 2013-06-05 20:08:47 -04:00
Felix S. Klock II 7f410b326c Attempt to get reuse of common code from multiple clones in different directories. 2013-05-30 16:26:12 +02:00
Felix S. Klock II 2b083373e4 Fix #6805: add --enable-ccache configure option to prefix compiler invocations with ccache to attempt to reuse common results, e.g. for LLVM (re)builds. 2013-05-29 23:18:09 +02:00
Alex Crichton af27e17992 Set the USE_UTF8 flag for linenoise to handle utf8-input 2013-05-24 22:32:55 -05:00
bors d68c0279ea auto merge of #6249 : crabtw/rust/arm, r=brson
It uses the private field of TCB head to store stack limit. I tested on my Raspberry PI. A simple hello world program ran without any problem. However, for a more complex program, it segfaulted as #6231.
2013-05-17 18:19:27 -07:00
Jyun-Yan You c2bf9bf9fe improve MIPS backend and implement segmented stacks 2013-05-09 16:51:42 +08:00
Jyun-Yan You 48b6262b38 preliminary Linux ARM support 2013-05-07 13:17:14 +08:00
Daniel Micay 86efd97a10 add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
Jyun-Yan You 99b156e78a mk: mips toolchain config 2013-04-04 18:52:24 +08:00
Daniel Micay c0be7df5de mark the assembly object stacks as non-executable
Closes #5643

This also removes the need to pass noexecstack to gcc, but that wasn't
actually working anymore.
2013-03-31 18:23:05 -04:00
Young-il Choi 268faef63a mk: target triple rename arm-unknown-android->arm-linux-androideabi 2013-03-13 09:21:12 +09:00
ILyoan cc76cb02fb mk: cleanup - minor fixes for android check 2013-03-08 14:45:16 +09:00