summary refs log tree commit diff
path: root/src/rt
AgeCommit message (Collapse)AuthorLines
2015-06-15src/rt/arch/i386/morestack.S: call rust_stack_exhausted via pltSteven Walter-3/+2
This prevents a relocation in the text section. Text relocations are incompatible with hardened kernels. https://github.com/rust-lang/rust/issues/5714
2015-05-23Auto merge of #25632 - alexcrichton:dt-dir, r=brsonbors-1/+2
This "fast path" in `DirEntry::file_type` on Unix wasn't turning out to be so much of a fast path as the `DT_DIR` case wasn't handled, so directories fell back to using `lstat` instead. This commit adds the missing case to return quickly if a path is a directory and `DirEntry::file_type` is used.
2015-05-19std: Handle DT_DIR file types in `dirent` pointersAlex Crichton-1/+2
This "fast path" in `DirEntry::file_type` on Unix wasn't turning out to be so much of a fast path as the `DT_DIR` case wasn't handled, so directories fell back to using `lstat` instead. This commit adds the missing case to return quickly if a path is a directory and `DirEntry::file_type` is used.
2015-05-19std: Mark rust_get_num_cpus as dllexportAlex Crichton-0/+7
This function is imported across the DLL boundary by the libtest dynamic library, so it has to be marked as dllexport somehow, and for now this is done with an attribute on the function specifically.
2015-05-19rt: Clean up to build with cl.exeAlex Crichton-15/+15
* Detect the #define _MSC_VER in addition to __WIN32__ * Don't include valgrind.h for windows * Remove unused `rust_valgrind_stack_{un,}register` functions * Add stub definition for `rust_running_on_valgrind` for windows * Conditionally define `rust_dbg_extern_empty_struct` as empty structures are not allowed by cl.exe apparently.
2015-05-12Very hacky MSVC hacks.Ricky Taylor-3/+1
Conflicts: mk/platform.mk src/librustc/session/config.rs src/librustc_back/target/aarch64_apple_ios.rs src/librustc_back/target/aarch64_linux_android.rs src/librustc_back/target/arm_linux_androideabi.rs src/librustc_back/target/arm_unknown_linux_gnueabi.rs src/librustc_back/target/arm_unknown_linux_gnueabihf.rs src/librustc_back/target/armv7_apple_ios.rs src/librustc_back/target/armv7s_apple_ios.rs src/librustc_back/target/i386_apple_ios.rs src/librustc_back/target/i686_apple_darwin.rs src/librustc_back/target/i686_pc_windows_gnu.rs src/librustc_back/target/i686_unknown_dragonfly.rs src/librustc_back/target/i686_unknown_linux_gnu.rs src/librustc_back/target/mips_unknown_linux_gnu.rs src/librustc_back/target/mipsel_unknown_linux_gnu.rs src/librustc_back/target/mod.rs src/librustc_back/target/powerpc_unknown_linux_gnu.rs src/librustc_back/target/x86_64_apple_darwin.rs src/librustc_back/target/x86_64_apple_ios.rs src/librustc_back/target/x86_64_pc_windows_gnu.rs src/librustc_back/target/x86_64_unknown_dragonfly.rs src/librustc_back/target/x86_64_unknown_freebsd.rs src/librustc_back/target/x86_64_unknown_linux_gnu.rs src/librustc_back/target/x86_64_unknown_openbsd.rs src/librustc_llvm/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/trans/base.rs src/libstd/os.rs src/rustllvm/RustWrapper.cpp
2015-05-06fix typos caught by codespellTshepang Lekhonkhobe-1/+1
2015-04-27std: Expand the area of std::fsAlex Crichton-70/+23
This commit is an implementation of [RFC 1044][rfc] which adds additional surface area to the `std::fs` module. All new APIs are `#[unstable]` behind assorted feature names for each one. [rfc]: https://github.com/rust-lang/rfcs/pull/1044 The new APIs added are: * `fs::canonicalize` - bindings to `realpath` on unix and `GetFinalPathNameByHandle` on windows. * `fs::symlink_metadata` - similar to `lstat` on unix * `fs::FileType` and accessor methods as `is_{file,dir,symlink}` * `fs::Metadata::file_type` - accessor for the raw file type * `fs::DirEntry::metadata` - acquisition of metadata which is free on Windows but requires a syscall on unix. * `fs::DirEntry::file_type` - access the file type which may not require a syscall on most platforms. * `fs::DirEntry::file_name` - access just the file name without leading components. * `fs::PathExt::symlink_metadata` - convenience method for the top-level function. * `fs::PathExt::canonicalize` - convenience method for the top-level function. * `fs::PathExt::read_link` - convenience method for the top-level function. * `fs::PathExt::read_dir` - convenience method for the top-level function. * `std::os::raw` - type definitions for raw OS/C types available on all platforms. * `std::os::$platform` - new modules have been added for all currently supported platforms (e.g. those more specific than just `unix`). * `std::os::$platform::raw` - platform-specific type definitions. These modules are populated with the bare essentials necessary for lowing I/O types into their raw representations, and currently largely consist of the `stat` definition for unix platforms. This commit also deprecates `Metadata::{modified, accessed}` in favor of inspecting the raw representations via the lowering methods of `Metadata`.
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-3/+0
2015-02-11renaming rust_load_self to rust_current_exeDave Huseby-1/+1
2015-02-11bitrig integrationDave Huseby-5/+281
2015-02-06Rollup merge of #21964 - semarie:openbsd-env, r=alexcrichtonManish Goregaokar-1/+1
- add `_SC_GETPW_R_SIZE_MAX` constant - declare `struct passwd` - convert `load_self` to `current_exe` Note: OpenBSD don't provide system function to return a valuable Path for `env::current_exe`. The implementation is currently based on the value of `argv[0]`, which couldn't be used when executable is called via PATH.
2015-02-05Tidy fixesBrian Anderson-2/+3
2015-02-05unbreak tree for openbsd after #21787Sébastien Marie-1/+1
- add `_SC_GETPW_R_SIZE_MAX` constant - declare `struct passwd` - convert `load_self` to `current_exe` Note: OpenBSD don't provide system function to return a valuable Path for `env::current_exe`. The implementation is currently based on the value of `argv[0]`, which couldn't be used when executable is called via PATH.
2015-02-01openbsd: incoporate remarksSébastien Marie-1/+1
- consolidate target_record_sp_limit and target_get_sp_limit functions for aarch64, powerpc, arm-ios and openbsd as there are all without segmented stacks (no need to duplicate functions). - rename __load_self function to rust_load_self - use a mutex inner load_self() as underline implementation is not thread-safe
2015-02-01openbsd supportSébastien Marie-2/+52
2015-01-19rt: Remove libtime wrappersklutzy-138/+0
They are unused since libtime is gone.
2015-01-15auto merge of #20980 : richo/rust/final-power, r=alexcrichtonbors-0/+22
Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it. This gets you as far as being able to target powerpc with, eg: LD_LIBRARY_PATH=./x86_64-unknown-linux-gnu/stage2/lib/ x86_64-unknown-linux-gnu/stage2/bin/rustc -C linker=powerpc-linux-gnu-gcc --target powerpc-unknown-linux-gnu hello.rs Would really love to get this out before 1.0. r? @alexcrichton
2015-01-11powerpc: Fix extraneous include in rt supportRicho Healey-2/+0
2015-01-11powerpc: rough platform supportRicho Healey-0/+24
2015-01-11Fix: GNU AArch64 assembler does not like @plt symbol suffixAkos Kiss-2/+2
2015-01-09iOS: preliminary 64-bit archs supportValerii Hiora-5/+21
2015-01-09iOS: makefiles and runtime for new archsValerii Hiora-0/+252
2015-01-03Initial version of AArch64 support.Akos Kiss-0/+36
Adds AArch64 knowledge to: * configure, * make files, * sources, * tests, and * documentation.
2014-12-22Removed unused context-switching assembly code.Maya Nitu-567/+0
2014-12-18Avoid .take().unwrap() with FnOnce closuresAlex Crichton-4/+4
2014-12-18libs: merge librustrt into libstdAaron Turon-1/+1
This commit merges the `rustrt` crate into `std`, undoing part of the facade. This merger continues the paring down of the runtime system. Code relying on the public API of `rustrt` will break; some of this API is now available through `std::rt`, but is likely to change and/or be removed very soon. [breaking-change]
2014-10-02remove the uv_support codeDaniel Micay-169/+0
2014-10-02rm libuv-auto-clean-triggerDaniel Micay-2/+0
2014-09-06readdir: return error instead of failing on invalid UTF-16Peter Atashian-27/+0
Fixes #15279 Signed-off-by: Peter Atashian <retep998@gmail.com>
2014-08-08Move system header includes above valgrind.h includeChris Nixon-4/+4
This allows rustc to be build under msys2's mingw64 gcc
2014-08-05Added clarification regarding rust_try_inner.Vadim Chugunov-1/+2
2014-08-04Implement unwinding for Win64.Vadim Chugunov-9/+25
The original trick used to trigger unwinds would not work with GCC's implementation of SEH, so I had to invent a new one: rust_try now consists of two routines: the outer one, whose handler triggers unwinds, and the inner one, that stops unwinds by having a landing pad that swallows exceptions and passes them on to the outer routine via a normal return.
2014-08-04Fix valgrind.h for Win64.Vadim Chugunov-30/+31
_WIN32 is defined for 64-bit builds as well, so test for _WIN64 first.
2014-07-29Port Rust to DragonFlyBSDMichael Neumann-3/+10
Not included are two required patches: * LLVM: segmented stack support for DragonFly [1] * jemalloc: simple configure patches [1]: http://reviews.llvm.org/D4705
2014-06-24auto merge of #14963 : w3ln4/rust/master, r=alexcrichtonbors-0/+171
The aim of these changes is not working out a generic bi-endianness architectures support but to allow people develop for little endian MIPS machines (issue #7190).
2014-06-24Added Mipsel architecture supportPawel Olzacki-0/+171
2014-06-21Add missing attributes to indirect calls for foreign functionsBjörn Steinbrink-0/+18
When calling a foreign function, some arguments and/or return value attributes are required to conform to the foreign ABI. Currently those attributes are only added to the declaration of foreign functions. With direct calls, this is no problem, because LLVM can see that those attributes apply to the call. But with an indirect call, LLVM cannot do that and the attribute is missing. To fix that, we have to add those attribute to the calls to foreign functions as well. This also allows to remove the special handling of the SRet attribute, which is ABI-dependent and will be set via the `attr` field of the return type's `ArgType`.
2014-06-13Cosmetic fixes & commentsValerii Hiora-1/+5
2014-06-12Runtime support for arm on iOSValerii Hiora-34/+74
2014-05-22libtime: Remove the `tz_zone` field from times.Patrick Walton-36/+6
It depends on `~str`.
2014-05-14update valgrind headersDaniel Micay-512/+1859
2014-05-11make sure jemalloc valgrind support is enabledDaniel Micay-1/+1
This requires pointing it at the valgrind headers we carry in-tree.
2014-05-03rustdoc: Migrate from sundown to hoedownAlex Crichton-5448/+0
This primary fix brought on by this upgrade is the proper matching of the ``` and ~~~ doc blocks. This also moves hoedown to a git submodule rather than a bundled repository. Additionally, hoedown is stricter about code blocks, so this ended up fixing a lot of invalid code blocks (ending with " ```" instead of "```", or ending with "~~~~" instead of "~~~"). Closes #12776
2014-04-24Update libuvAlex Crichton-1/+1
This update brings a few months of changes, but primarily a fix for the following situation. When creating a handle to stdin, libuv used to set the stdin handle to nonblocking mode. This would end up affect this stdin handle across all processes that shared it, which mean that stdin become nonblocking for everyone using the same stdin. On linux, this also affected *stdout* because stdin/stdout roughly point at the same thing. This problem became apparent when running the test suite manually on a local computer. The stdtest suite (running with libgreen) would set stdout to nonblocking mode (as described above), and then the next test suite would always fail for a printing failure (because stdout was returning EAGAIN). This has been fixed upstream, joyent/libuv@342e8c, and this update pulls in this fix. This also brings us in line with a recently upstreamed libuv patch. Closes #13336 Closes #13355
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-1/+1
2014-04-08Fix spelling errors in comments.Joseph Crail-1/+1
2014-03-25rustuv: Handle short writes in uv_fs_writeAlex Crichton-1/+1
The libuv fs wrappers are very thin wrappers around the syscalls they correspond to, and a notable worrisome case is the write syscall. This syscall is not guaranteed to write the entire buffer provided, so we may have to continue calling uv_fs_write if a short write occurs. Closes #13130
2014-03-21rand: Rewrite OsRng in Rust for windowsAlex Crichton-59/+0
This removes even more rust_builtin.c code, and allows us to more gracefully handle errors (not a process panic, but a task failure).
2014-03-19rustc: Fix x86 ffi for empty struct argumentsklutzy-0/+23