Commit Graph

271 Commits

Author SHA1 Message Date
Brian Anderson 07f8555b3e std: Add some hacks to use libuv 2012-01-22 20:06:58 -08:00
User Jyyou a59c4b1b47 freebsd support 2012-01-01 20:18:55 -08:00
Brian Anderson 4699b6865f build: Use llvm-mc as our assembler
LLVM's assembler understands .cfi pseudo-ops on the mac, which we need in
order to generate frames that can be DWARF-unwound
2011-12-10 18:51:21 -08:00
Austin Seipp b513a5a500 Make valgrind usage more consistent and less error prone.
I was still having issues with the build system somehow getting confused
as to which set of valgrind headers to use when compiling rt.

This commit moves all the valgrind headers into their own directory
under rt and makes the usage more consistent. The compiler is now passed
the -DNVALGRIND flag when valgrind is not installed, as opposed to
passing -DHAVE_VALGRIND.

We also pass -I src/rt to the compiler when building rt so you can more
easily import what you want. I also cleaned up some erroneous #includes
along the way.

It should be safe to always just import the local valgrind headers and use
them without question. NVALGRIND turns the operations to no-ops when it
is active, and the build and tests run cleanly with or without.
2011-12-06 01:15:29 -06:00
Brian Anderson 7476a39e47 stdlib: Implement some preliminary libuv bindings
std::uv is intended to be low-level, exactly mirroring the C API.
Difficult to continue the implementation now without scheduler
improvements.
2011-12-01 10:24:21 -08:00
Brian Anderson b2fd6121c0 build: Pass -fPIC to the libuv build 2011-12-01 10:24:21 -08:00
Niko Matsakis 9c00c62b08 fix makefiles, add option to ignore changes in makefiles 2011-11-29 12:51:09 -08:00
Brian Anderson cd91c6d065 rt: Build __morestack as a static library and copy it to the right places 2011-11-28 18:01:42 -08:00
Brian Anderson e075412a92 build: Stop linking morestack.S to rt
__morestack has to be linked statically. The odd calling convention on x86_64
results in the arguments to __morestack (r10 & r11) being clobbered by the
dynamic linker. gcc links all the __morestack functions statically.
2011-11-28 16:37:29 -08:00
Brian Anderson 6bdf347418 rt: Make __morestack (without unwinding) work on 32-bit linux 2011-11-22 18:02:10 -08:00
Brian Anderson d624e523c9 rt: Make stack growth code build on Linux 2011-11-17 10:53:06 -08:00
Patrick Walton e6c3c4e48c rt: More work on morestack 2011-11-17 10:52:59 -08:00
Brian Anderson 02cebbb9f1 Revert "rt: More work on morestack"
This reverts commit 68aff2ad6d.
2011-11-16 18:49:19 -08:00
Brian Anderson 5559e149e4 Revert "rt: Make stack growth code build on Linux"
This reverts commit da4b7da4e1.
2011-11-16 18:49:07 -08:00
Brian Anderson da4b7da4e1 rt: Make stack growth code build on Linux 2011-11-16 18:33:00 -08:00
Patrick Walton 68aff2ad6d rt: More work on morestack 2011-11-16 18:00:57 -08:00
Patrick Walton b3cf0c4d1b Revert "rt: More work on morestack"
This reverts commit ced0d4f15e.
2011-11-14 16:20:53 -08:00
Patrick Walton ced0d4f15e rt: More work on morestack 2011-11-14 16:17:08 -08:00
Brian Anderson 5d1e321ecb rt: Remove rust_chan 2011-11-11 12:11:21 -08:00
Brian Anderson f705f68121 rt: Remove rust_aio.cpp. Bitrotted. 2011-11-10 18:02:08 -08:00
Niko Matsakis ff5b319ce5 correct stack alignment 2011-11-08 21:14:09 -08:00
Erick Tryzelaar ab265586eb Re-add libuv as a submodule. 2011-11-08 19:01:47 -08:00
Brian Anderson 8857657640 Rename rust_uv.cpp to rust_aio.cpp 2011-11-07 19:35:39 -08:00
Brian Anderson 558ca9b4a8 Escape $ when building linux def files 2011-11-02 14:24:15 -07:00
Niko Matsakis 305cecee4f pass proper options to libuv make 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 3f4fd29db8 fix failed merge 2011-11-02 14:14:20 -07:00
Niko Matsakis f05761ddb3 enable intrinsics for multiple arch 2011-11-02 14:13:22 -07:00
Niko Matsakis f0c1f999ac arch is ia32 in libuv, annoyingly. this should be changed. 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
Niko Matsakis 8011e3fabb hack around on makefiles trying to get a 64 bit build
right now there are many temporary hacks, search for NDM to find them
2011-11-02 14:13:22 -07:00
Patrick Walton c9003d301f Stub a __morestack implementation and stack segment allocation. Untested. 2011-10-31 14:20:56 -07:00
Marijn Haverbeke ba1c6fcf38 Remove the last vestiges of main.ll
Closes #992
2011-10-20 17:36:28 +02:00
Marijn Haverbeke 243c5c3479 Use snap runtime, and the old main.o, for stage1
This is intended to be reverted again after I register the next
snapshot.
2011-10-20 13:14:28 +02:00
Brian Anderson 4709038d64 Bring make distcheck up to date 2011-10-06 18:12:15 -07:00
Brian Anderson d8a85f0758 Make rpath work on mac 2011-10-06 13:09:00 -07:00
Patrick Walton d8a80cb31f rt: Add a call stub that switches to the C stack, untested as of yet 2011-09-28 12:26:36 -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
Patrick Walton 61afef29a1 rt: Add a RUST_TRACK_ORIGINS debug flag to help track down memory corruption 2011-09-23 11:42:20 -07:00
Patrick Walton e26b1883dd rt: Stub code for the cycle collector 2011-09-20 16:49:31 -07:00
Patrick Walton 25416bfae1 rustc: Introduce ABI versioning so we can change value representations without breaking the compiler 2011-08-20 14:22:09 -07:00
Patrick Walton 396f6b4f59 rustc: Stub GC routines 2011-08-18 18:48:32 -07:00
Patrick Walton 0fedea39ce rt: Remove rust_alarm dead code 2011-08-18 18:21:03 -07:00
Patrick Walton d8c5bd6195 rt: Implement obstacks, untested as of yet 2011-08-16 19:49:25 -07:00
Eric Holk a332043561 Updating to build on Linux and Mac, and hopefully Windows too. 2011-08-15 09:26:51 -07:00
Brian Anderson 1758876381 Build libuv with the same C compiler as the rest of rt 2011-08-05 11:57:07 -07:00
Graydon Hoare 7da64ae461 Munge libuv makefiles sufficiently to build out of tree. 2011-08-05 11:57:07 -07:00
Brian Anderson b2c3fc739c More win32 libuv build tweaks 2011-08-05 11:57:07 -07:00
Brian Anderson 585c6f96d1 Update build rules so rt builds with libuv on Linux.
Needed to shuffle around the linker arguments and add -lpthread
2011-08-05 11:57:06 -07:00
Rob Arnold 8229c3fa75 Update libuv to revision ee599ec1141cc48f895de1f9d148033babdf9c2a 2011-08-05 11:57:06 -07:00
Rob Arnold f4b87c749f Basic async IO module using libuv 2011-08-05 11:57:06 -07:00
Rob Arnold b64a52df42 Integrate libuv into the build system 2011-08-05 11:57:06 -07:00
Patrick Walton e351ad762d rt: Stub shape glue and implement shape::print and shape::size_of. 2011-08-03 20:25:44 -07:00
Eric Holk d1dbb99984 Removing proxies and message queues. 2011-07-29 18:54:59 -07:00
Brian Anderson 4ef1ec580a Do all runtime calls to getenv at initialization
getenv is not threadsafe and (maybe as a result) it's randomly crashing with
CFLAGS=-g and RUST_THREADS=32. Calls from rust code are still on their
own.
2011-07-28 12:23:01 -07:00
Graydon Hoare 336a4df778 Remove 'Nop.' comments, add emacs lines, remove obsolete file. 2011-07-13 14:03:18 -07:00
Eric Holk f6f8a06d6b Resurrecting the runtime unit tests, and modifying them so they compile under the latest refactoring changes. 2011-06-28 16:12:34 -07:00
Eric Holk 657e5a2bd5 Renamed what's left of rust_dom to rust_scheduler 2011-06-28 16:12:33 -07:00
Eric Holk 1c852ac9c0 Removing runtime tests. The runtime is tested well enough by the standard library tests, so we might as well have less code to fix during refactoring. 2011-06-28 16:12:33 -07:00
Graydon Hoare 79ba31504b Fixes to speed and clean up makefiles. 2011-06-25 19:23:32 +00:00
Michael Sullivan bd8f6097a7 Get rid of old vec_append glue. 2011-06-16 11:58:29 -07:00
Eric Holk d1857d30fc This is the mega-ucontext commit. It replaces the task switching mechanism with a new one inspired by ucontext. It works under Linux, OS X and Windows, and is Valgrind clean on Linux and OS X (provided the runtime is built with gcc).
This commit also moves yield and join to the standard library, as requested in #42. Join is currently a no-op though.
2011-06-13 18:14:13 -07:00
Rafael Ávila de Espíndola 2c16be424b Use main.o directly now that stage0 is ok with it. 2011-06-08 13:33:35 -04:00
Rafael Ávila de Espíndola b1d6f12a05 Don't put a copy of main (the C one) in each binary we produce. This is a step
in getting a driver that works on all linux systems.

Sorry for the linker hacks, I will remove them after snapshotting a new compiler.
2011-06-07 16:56:27 -04:00
Rafael Ávila de Espíndola cc96eeafca Move rust_vec_append_glue to rt. 2011-05-31 14:32:08 -04:00
Graydon Hoare 79c9e13073 More delicious dead code removal from runtime, upcalls. 2011-05-26 18:21:02 -07:00
Rafael Ávila de Espíndola ac836dd79c There is only one yield glue. 2011-05-24 18:29:08 -04:00
Rafael Ávila de Espíndola 0fc91b6ecc There is only one activate function now. 2011-05-24 17:00:45 -04:00
Rafael Ávila de Espíndola 96516e9ca2 One exit_task_glue to rule them all. 2011-05-18 15:43:48 -04:00
Patrick Walton 269550f673 build: Use clang to compile the runtime if available 2011-05-08 21:10:43 -07:00
Graydon Hoare 40624e35d7 Start splitting up Makefile.in 2011-05-01 20:20:25 +00:00