rust/src
bors 463d6680d1 auto merge of #16110 : alexcrichton/rust/issue-15460, r=brson
As discovered in #15460, a particular #[link(kind = "static", ...)] line is not
actually guaranteed to link the library at all. The reason for this is that if
the external library doesn't have any referenced symbols in the object generated
by rustc, the entire library is dropped by the linker.

For dynamic native libraries, this is solved by passing -lfoo for all downstream
compilations unconditionally. For static libraries in rlibs this is solved
because the entire archive is bundled in the rlib. The only situation in which
this was a problem was when a static native library was linked to a rust dynamic
library.

This commit brings the behavior of dylibs in line with rlibs by passing the
--whole-archive flag to the linker when linking native libraries. On OSX, this
uses the -force_load flag. This flag ensures that the entire archive is
considered candidate for being linked into the final dynamic library.

This is a breaking change because if any static library is included twice in the
same compilation unit then the linker will start emitting errors about duplicate
definitions now. The fix for this would involve only statically linking to a
library once.

Closes #15460
[breaking-change]
2014-08-04 22:21:25 +00:00
..
compiler-rt@62a4ca6055 Update compiler-rt to work for non-v7 arm. 2014-06-18 17:02:08 -07:00
compiletest Fix misspelled comments. 2014-08-01 19:42:52 -04:00
doc Rename modules.rs to main.rs in guide 2014-08-04 16:23:46 +02:00
driver
etc auto merge of #15986 : Florob/rust/nfKc-new, r=alexcrichton 2014-08-04 17:06:19 +00:00
grammar adding proof of context-sensitivy of raw string literals 2014-07-27 02:13:19 -04:00
gyp@1e46da1000
jemalloc@024c67ad65 Updated deps 2014-06-12 20:20:12 +03:00
liballoc rustc: Link entire archives of native libraries 2014-08-04 11:02:26 -07:00
libarena alloc, arena, test, url, uuid: Elide lifetimes. 2014-07-31 11:50:24 -07:00
libbacktrace
libcollections auto merge of #15986 : Florob/rust/nfKc-new, r=alexcrichton 2014-08-04 17:06:19 +00:00
libcore num: Fix the documentation of abs_sub. 2014-08-04 14:04:28 +09:00
libcoretest core: add a reverse method to Ordering. 2014-08-03 11:50:19 +10:00
libdebug deprecate Vec::get 2014-07-17 12:08:31 +12:00
libflate Update doc URLs for version bump 2014-07-11 11:21:57 -07:00
libfmt_macros librustc: Disallow mutation and assignment in pattern guards, and modify 2014-07-25 15:26:21 -07:00
libfourcc Deprecate fourcc. 2014-07-31 11:50:24 -07:00
libgetopts Fix typo in getopts::getopts documentation, return Matches instead of Opt 2014-07-28 17:35:31 +01:00
libglob deprecate Vec::get 2014-07-17 12:08:31 +12:00
libgraphviz Get rid of few warnings in tests 2014-07-21 09:55:04 -07:00
libgreen Fix misspelled comments. 2014-08-01 19:42:52 -04:00
libhexfloat hexfloat: Deprecate to move out of the repo 2014-07-31 11:50:23 -07:00
liblibc Port Rust to DragonFlyBSD 2014-07-29 16:44:39 +02:00
liblog Rename the std::ascii::{Owned,}StrAsciiExt traits to {Owned,}AsciiExt 2014-07-29 23:59:19 +01:00
libnative Change everything returning libc::sockaddr_storage to use an &mut out-ptr instead 2014-08-04 12:52:58 -07:00
libnum Improve documentation of rounding functions 2014-07-29 15:43:59 -07:00
librand Add a ton of ignore-lexer-test 2014-07-21 18:38:40 -07:00
librbml libserialize: add error() to Decoder 2014-07-31 21:41:19 -07:00
libregex collections: Deprecate shift/unshift 2014-07-23 13:20:16 -07:00
libregex_macros Refactoring: Only use MacroExpander for expanding outside of 2014-07-22 01:00:03 +02:00
librlibc rlibc: add unit tests 2014-07-21 09:54:23 -07:00
librustc rustc: Link entire archives of native libraries 2014-08-04 11:02:26 -07:00
librustc_back rustc: Link entire archives of native libraries 2014-08-04 11:02:26 -07:00
librustc_llvm librustc: Use builder for llvm attributes. 2014-07-25 16:06:44 -07:00
librustdoc rustdoc: Add rustdoc class to <body> tag 2014-08-02 18:59:59 -07:00
librustrt rustc: Link entire archives of native libraries 2014-08-04 11:02:26 -07:00
librustuv Change everything returning libc::sockaddr_storage to use an &mut out-ptr instead 2014-08-04 12:52:58 -07:00
libsemver Deprecate semver. 2014-07-31 11:50:23 -07:00
libserialize libserialize: add error() to Decoder 2014-07-31 21:41:19 -07:00
libstd rustc: Link entire archives of native libraries 2014-08-04 11:02:26 -07:00
libsync Fix misspelled comments. 2014-08-01 19:42:52 -04:00
libsyntax Fix misspelled comments. 2014-08-01 19:42:52 -04:00
libterm collections: Deprecate shift/unshift 2014-07-23 13:20:16 -07:00
libtest alloc, arena, test, url, uuid: Elide lifetimes. 2014-07-31 11:50:24 -07:00
libtime time::Tm should impl Eq in addition to PartialEq 2014-08-02 10:25:32 -07:00
libunicode collections, unicode: Add support for NFC and NFKC 2014-07-28 18:47:38 +02:00
liburl alloc, arena, test, url, uuid: Elide lifetimes. 2014-07-31 11:50:24 -07:00
libuuid libuuid: use Decoder::error() rather than failing on bad decode 2014-07-31 21:41:19 -07:00
libuv@43495892de Update libuv 2014-04-24 09:08:07 -07:00
llvm@0d999e5b31 Update LLVM to fix miscompilations due to wrongfully removed lifetime intrinsics 2014-07-29 15:44:26 -07:00
rt Port Rust to DragonFlyBSD 2014-07-29 16:44:39 +02:00
rustllvm Update LLVM to fix miscompilations due to wrongfully removed lifetime intrinsics 2014-07-29 15:44:26 -07:00
test rustc: Link entire archives of native libraries 2014-08-04 11:02:26 -07:00
README.md Update README file for src/ directory 2014-06-03 14:06:54 +02:00
snapshots.txt Register new snapshots 2014-07-19 20:38:00 -07:00

This is a preliminary version of the Rust compiler, libraries and tools.

Source layout:

Path Description
librustc/ The self-hosted compiler
liballoc/ Rust's core allocation library
libcore/ The Rust core library
libdebug/ Debugging utilities
libstd/ The standard library (imported and linked by default)
libgreen/ The M:N runtime library
libnative/ The 1:1 runtime library
libsyntax/ The Rust parser and pretty-printer
libtest/ Rust's test-runner code
------------------- ---------------------------------------------------------
libarena/ The arena (a fast but limited) memory allocator
libbacktrace/ The libbacktrace library
libcollections/ A collection of useful data structures and containers
libflate/ Simple compression library
libfmt_macros/ Macro support for format strings
libfourcc/ Data format identifier library
libgetopts/ Get command-line-options library
libglob/ Unix glob patterns library
libgraphviz/ Generating files for Graphviz
libhexfloat/ Hexadecimal floating-point literals
liblibc/ Bindings for the C standard library
liblog/ Utilities for program-wide and customizable logging
libnum/ Extended number support library (complex, rational, etc)
librand/ Random numbers and distributions
libregex/ Regular expressions
libregex_macros/ The regex! syntax extension
libsemver/ Rust's semantic versioning library
libserialize/ Encode-Decode types library
libsync/ Concurrency mechanisms and primitives
libterm/ ANSI color library for terminals
libtime/ Time operations library
liburl/ URL handling lirary
libuuid/ UUID's handling code
------------------- ---------------------------------------------------------
rt/ The runtime system
rt/rust_*.c - Some of the runtime services
rt/vg - Valgrind headers
rt/msvc - MSVC support
rt/sundown - The Markdown library used by rustdoc
------------------- ---------------------------------------------------------
compiletest/ The test runner
test/ Testsuite
test/codegen - Tests for the LLVM IR infrastructure
test/compile-fail - Tests that should fail to compile
test/debug-info - Tests for the debuginfo tool
test/run-fail - Tests that should compile, run and fail
test/run-make - Tests that depend on a Makefile infrastructure
test/run-pass - Tests that should compile, run and succeed
test/bench - Benchmarks and miscellaneous
test/pretty - Pretty-printer tests
test/auxiliary - Dependencies of tests
------------------- ---------------------------------------------------------
librustdoc/ The Rust API documentation tool
libuv/ The libuv submodule
librustuv/ Rust libuv support code
------------------- ---------------------------------------------------------
llvm/ The LLVM submodule
rustllvm/ LLVM support code
------------------- ---------------------------------------------------------
etc/ Scripts, editors support, misc

NOTE: This list (especially the second part of the table which contains modules and libraries) is highly volatile and subject to change.