about summary refs log tree commit diff
path: root/src/librustc/back/rpath.rs
AgeCommit message (Collapse)AuthorLines
2014-07-14Extract rpath to rustc_back::rpathBrian Anderson-238/+0
2014-07-14rustc: Invert some rpath dependenciesBrian Anderson-84/+58
2014-06-12Basic iOS supportValerii Hiora-1/+1
2014-06-05Fallout from the libcollections movementAlex Crichton-1/+1
2014-05-27std: Rename strbuf operations to stringRicho Healey-27/+27
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-8/+8
[breaking-change]
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-3/+4
[breaking-change]
2014-05-12librustc: Remove all uses of `~str` from librustc.Patrick Walton-26/+54
2014-05-08Handle fallout in librustcKevin Ballard-2/+2
2014-04-24use option_env! instead of env!Niko Matsakis-2/+2
2014-04-23Enable use of syntax extensions when cross compiling.Douglas Young-1/+1
This adds the target triple to the crate metadata. When searching for a crate the phase (link, syntax) is taken into account. During link phase only crates matching the target triple are considered. During syntax phase, either the target or host triple will be accepted, unless the crate defines a macro_registrar, in which case only the host triple will match.
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-12/+13
2014-04-18Update the rest of the compiler with ~[T] changesAlex Crichton-2/+0
2014-04-10rustc: Use realpath() for sysroot/rpathAlex Crichton-3/+4
When calculating the sysroot, it's more accurate to use realpath() rather than just one readlink() to account for any intermediate symlinks that the rustc binary resolves itself to. For rpath, realpath() is necessary because the rpath must dictate a relative rpath from the destination back to the originally linked library, which works more robustly if there are no symlinks involved. Concretely, any binary generated on OSX into $TMPDIR requires an absolute rpath because the temporary directory is behind a symlink with one layer of indirection. This symlink causes all relative rpaths to fail to resolve. cc #11734 cc #11857
2014-04-10rustc: Don't rpath to librustrt.dylibAlex Crichton-12/+3
This library no longer exists, there's no reason for this rpath to exist any more.
2014-04-10rustc: Remove absolute rpathsAlex Crichton-29/+1
Concerns have been raised about using absolute rpaths in #11746, and this is the first step towards not relying on rpaths at all. The only current use case for an absolute rpath is when a non-installed rust builds an executable that then moves from is built location. The relative rpath back to libstd and absolute rpath to the installation directory still remain (CFG_PREFIX). Closes #11746 Rebasing of #12754
2014-03-26rustc: Fix tests for sysroot changesBrian Anderson-2/+2
2014-03-25install: Support --libdir and --mandir correctlyBrian Anderson-7/+10
This adds a hack to rustc to make it find the library directory regardless of whether it is named lib/lib64/lib32.
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-20rename std::vec -> std::sliceDaniel Micay-2/+2
Closes #12702
2014-03-17De-@ filesearch.Eduard Burtescu-2/+2
2014-03-17De-@ Session usage.Eduard Burtescu-3/+3
2014-03-08librustc: Fix up fallout from the automatic conversion.Felix S. Klock II-7/+8
2014-03-08librustc: Automatically change uses of `~[T]` to `Vec<T>` in rustc.Patrick Walton-12/+12
2014-02-28std: Change assert_eq!() to use {} instead of {:?}Alex Crichton-2/+2
Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries.
2014-02-23Move std::{trie, hashmap} to libcollectionsAlex Crichton-1/+1
These two containers are indeed collections, so their place is in libcollections, not in libstd. There will always be a hash map as part of the standard distribution of Rust, but by moving it out of the standard library it makes libstd that much more portable to more platforms and environments. This conveniently also removes the stuttering of 'std::hashmap::HashMap', although 'collections::HashMap' is only one character shorter.
2014-01-17rustc::metadata: Remove trait FileSearchklutzy-2/+2
2014-01-05Make rustc's own lib directory configurable and change the default to ↵Jan Niklas Hasse-1/+4
rustlib. Fixes #3319
2013-12-25Method-ify CStoreSteven Fackler-1/+1
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-9/+9
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-11-29Add generation of static libraries to rustcAlex Crichton-6/+18
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-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-9/+9
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-1/+0
2013-11-09Add a "system" ABIAlex Crichton-16/+14
This adds an other ABI option which allows a custom selection over the target architecture and OS. The only current candidate for this change is that kernel32 on win32 uses stdcall, but on win64 it uses the cdecl calling convention. Otherwise everywhere else this is defined as using the Cdecl calling convention. cc #10049 Closes #8774
2013-11-05Use loader_path instead of executable_path for osxAlex Crichton-2/+2
According to apple's documentation of rpath semantics, @executable_path means that the path is relative the the *process executable*, not necessarily the library in question. On the other hand, @loader_path is the path that points to the library which contains the @loader_path reference. All of our rpath usage is based off the library or executable, not just the executable. This means that on OSX we should be using @loader_path instead of @executable_path to achieve the same semantics as linux's $ORIGIN.
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-10/+10
Who doesn't like a massive renaming?
2013-10-16Implement new methods vec.starts_with()/vec.ends_with()Kevin Ballard-5/+2
2013-10-16path2: Update based on more review feedbackKevin Ballard-2/+2
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-11/+11
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-46/+64
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-09-30rustc: Remove usage of fmt!Alex Crichton-11/+11
2013-09-19Replace unreachable() calls with unreachable!().Chris Morgan-2/+2
This is the second of two parts of #8991, now possible as a new snapshot has been made. (The first part implemented the unreachable!() macro; it was #8992, 6b7b8f2682.) ``std::util::unreachable()`` is removed summarily; any code which used it should now use the ``unreachable!()`` macro. Closes #9312. Closes #8991.
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-12/+12
2013-08-12fix build with the new snapshot compilerDaniel Micay-13/+0
2013-08-10syntax and rustc: fix some warningsErick Tryzelaar-1/+1
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-3/+3
cc #5898
2013-08-09auto merge of #8176 : catamorphism/rust/rustpkg-extern-mod, r=catamorphismbors-113/+4
r? @graydon Also, notably, make rustpkgtest depend on the rustpkg executable (otherwise, tests that shell out to rustpgk might run when rustpkg doesn't exist).
2013-08-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-113/+4
This commit allows you to write: extern mod x = "a/b/c"; which means rustc will search in the RUST_PATH for a package with ID a/b/c, and bind it to the name `x` if it's found. Incidentally, move get_relative_to from back::rpath into std::path
2013-08-08env! syntax extension changesSteven Fackler-0/+9
env! aborts compilation of the specified environment variable is not defined and takes an optional second argument containing a custom error message. option_env! creates an Option<&'static str> containing the value of the environment variable. There are no run-pass tests that check the behavior when the environment variable is defined since the test framework doesn't support setting environment variables at compile time as opposed to runtime. However, both env! and option_env! are used inside of rustc itself, which should act as a sufficient test. Close #2248