Skip to content

Commit

Permalink
auto merge of #10593 : metajack/rust/pkgid-hash, r=brson
Browse files Browse the repository at this point in the history
This replaces the link meta attributes with a pkgid attribute and uses a hash
of this as the crate hash. This makes the crate hash computable by things
other than the Rust compiler. It also switches the hash function ot SHA1 since
that is much more likely to be available in shell, Python, etc than SipHash.

Fixes #10188, #8523.
  • Loading branch information
bors committed Dec 11, 2013
2 parents 5aad292 + a16753c commit ac4dd9e
Show file tree
Hide file tree
Showing 112 changed files with 1,263 additions and 605 deletions.
3 changes: 2 additions & 1 deletion mk/tests.mk
Expand Up @@ -394,7 +394,8 @@ $(3)/stage$(1)/test/rustdoctest-$(2)$$(X_$(2)): \
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
$$(SREQ$(1)_T_$(2)_H_$(3)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX_$(2)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2)) \
$$(SUNDOWN_LIB_$(2))
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
-L $$(SUNDOWN_DIR_$(2))
Expand Down
8 changes: 4 additions & 4 deletions src/driver/driver.rs
Expand Up @@ -9,15 +9,15 @@
// except according to those terms.

#[cfg(rustpkg)]
extern mod this(name = "rustpkg");
extern mod this = "rustpkg";

#[cfg(rustdoc)]
extern mod this(name = "rustdoc");
extern mod this = "rustdoc";

#[cfg(rustc)]
extern mod this(name = "rustc");
extern mod this = "rustc";

#[cfg(rustdoc_ng)]
extern mod this(name = "rustdoc_ng");
extern mod this = "rustdoc_ng";

fn main() { this::main() }
1 change: 1 addition & 0 deletions src/etc/combine-tests.py
Expand Up @@ -42,6 +42,7 @@ def scrub(b):
c = open("tmp/run_pass_stage2.rc", "w")
i = 0
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
c.write("#[pkgid=\"run_pass_stage2#0.1\"];\n")
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
c.write("#[feature(globs, macro_rules, struct_variant, managed_boxes)];\n")
c.write("#[allow(attribute_usage)];\n")
Expand Down
2 changes: 2 additions & 0 deletions src/libextra/lib.rs
Expand Up @@ -20,6 +20,8 @@ Rust extras are part of the standard Rust distribution.
*/

#[pkgid="extra#0.9-pre"];
// NOTE: remove after the next snapshot
#[link(name = "extra",
package_id = "extra",
vers = "0.9-pre",
Expand Down

0 comments on commit ac4dd9e

Please sign in to comment.