Skip to content

Commit ac4dd9e

Browse files
committed
auto merge of #10593 : metajack/rust/pkgid-hash, r=brson
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.
2 parents 5aad292 + a16753c commit ac4dd9e

File tree

112 files changed

+1263
-605
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+1263
-605
lines changed

mk/tests.mk

+2-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,8 @@ $(3)/stage$(1)/test/rustdoctest-$(2)$$(X_$(2)): \
394394
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
395395
$$(SREQ$(1)_T_$(2)_H_$(3)) \
396396
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX_$(2)) \
397-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2))
397+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC_$(2)) \
398+
$$(SUNDOWN_LIB_$(2))
398399
@$$(call E, compile_and_link: $$@)
399400
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
400401
-L $$(SUNDOWN_DIR_$(2))

src/driver/driver.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
// except according to those terms.
1010

1111
#[cfg(rustpkg)]
12-
extern mod this(name = "rustpkg");
12+
extern mod this = "rustpkg";
1313

1414
#[cfg(rustdoc)]
15-
extern mod this(name = "rustdoc");
15+
extern mod this = "rustdoc";
1616

1717
#[cfg(rustc)]
18-
extern mod this(name = "rustc");
18+
extern mod this = "rustc";
1919

2020
#[cfg(rustdoc_ng)]
21-
extern mod this(name = "rustdoc_ng");
21+
extern mod this = "rustdoc_ng";
2222

2323
fn main() { this::main() }

src/etc/combine-tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def scrub(b):
4242
c = open("tmp/run_pass_stage2.rc", "w")
4343
i = 0
4444
c.write("// AUTO-GENERATED FILE: DO NOT EDIT\n")
45+
c.write("#[pkgid=\"run_pass_stage2#0.1\"];\n")
4546
c.write("#[link(name=\"run_pass_stage2\", vers=\"0.1\")];\n")
4647
c.write("#[feature(globs, macro_rules, struct_variant, managed_boxes)];\n")
4748
c.write("#[allow(attribute_usage)];\n")

src/libextra/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Rust extras are part of the standard Rust distribution.
2020
2121
*/
2222

23+
#[pkgid="extra#0.9-pre"];
24+
// NOTE: remove after the next snapshot
2325
#[link(name = "extra",
2426
package_id = "extra",
2527
vers = "0.9-pre",

0 commit comments

Comments
 (0)