1. 06 7月, 2014 7 次提交
    • A
      rustc: Add a flag for specifying dependencies · cc3c8bbf
      Alex Crichton 提交于
      This comit implements a new flag, --extern, which is used to specify where a
      crate is located. The purpose of this flag is to bypass the normal crate
      loading/matching of the compiler to point it directly at the right file.
      
      This flag takes the form `--extern foo=bar` where `foo` is the name of a crate
      and `bar` is the location at which to find the crate. Multiple `--extern`
      directives are allowed with the same crate name to specify the rlib/dylib pair
      for a crate. It is invalid to specify more than one rlib or more than one dylib,
      and it's required that the crates are valid rust crates.
      
      I have also added some extensive documentation to metadata::loader about how
      crate loading should work.
      
      RFC: 0035-remove-crate-id
      cc3c8bbf
    • A
      rustc: Stop putting hashes in filenames by default · df4ea9c3
      Alex Crichton 提交于
      The compiler will no longer insert a hash or version into a filename by default.
      Instead, all output is simply based off the crate name being compiled. For
      example, a crate name of `foo` would produce the following outputs:
      
      * bin => foo
      * rlib => libfoo.rlib
      * dylib => libfoo.{so,dylib} or foo.dll
      * staticlib => libfoo.a
      
      The old behavior has been moved behind a new codegen flag,
      `-C extra-filename=<hash>`. For example, with the "extra filename" of `bar` and
      a crate name of `foo`, the following outputs would be generated:
      
      * bin => foo (same old behavior)
      * rlib => libfoobar.rlib
      * dylib => libfoobar.{so,dylib} or foobar.dll
      * staticlib => libfoobar.a
      
      The makefiles have been altered to pass a hash by default to invocations of
      `rustc` so all installed rust libraries will have a hash in their filename. This
      is done because the standard libraries are intended to be installed into
      privileged directories such as /usr/local. Additionally, it involves very few
      build system changes!
      
      RFC: 0035-remove-crate-id
      [breaking-change]
      df4ea9c3
    • A
      Add #[crate_name] attributes as necessary · e44c2b9b
      Alex Crichton 提交于
      e44c2b9b
    • A
      rustc: Modify crate loading to ignore versions · c956b70d
      Alex Crichton 提交于
      This commit modifies crate loading to purely work off a `crate_name` and nothing
      else. This commit also changes the patterns recognized from `lib<foo>-*` to
      `lib<foo>*` to accomodate the future renamings of output files.
      
      RFC: 0035-remove-crate-id
      c956b70d
    • A
      rustc: Add a new codegen flag, -C metadata=foo · 1007739b
      Alex Crichton 提交于
      This metadata is used to drive the hash of all symbols in a crate. The flag can
      be specified a multiple number of times
      
      RFC: 0035-remove-crate-id
      1007739b
    • A
      rustc: Remove CrateId and all related support · 50ee1ec1
      Alex Crichton 提交于
      This commit removes all support in the compiler for the #[crate_id] attribute
      and all of its derivative infrastructure. A list of the functionality removed is:
      
      * The #[crate_id] attribute no longer exists
      * There is no longer the concept of a version of a crate
      * Version numbers are no longer appended to symbol names
      * The --crate-id command line option has been removed
      
      To migrate forward, rename #[crate_id] to #[crate_name] and only the name of the
      crate itself should be mentioned. The version/path of the old crate id should be
      removed.
      
      For a transitionary state, the #[crate_id] attribute is still accepted if
      the #[crate_name] is not present, but it is warned about if it is the only
      identifier present.
      
      RFC: 0035-remove-crate-id
      [breaking-change]
      50ee1ec1
    • B
      aaff4e05
  2. 05 7月, 2014 33 次提交