From 7df6f4161cdc13a19216b5f1087081f490f06cdb Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 9 Mar 2018 09:26:15 -0800 Subject: [PATCH 1/2] rustc: Add a `#[wasm_custom_section]` attribute This commit is an implementation of adding custom sections to wasm artifacts in rustc. The intention here is to expose the ability of the wasm binary format to contain custom sections with arbitrary user-defined data. Currently neither our version of LLVM nor LLD supports this so the implementation is currently custom to rustc itself. The implementation here is to attach a `#[wasm_custom_section = "foo"]` attribute to any `const` which has a type like `[u8; N]`. Other types of constants aren't supported yet but may be added one day! This should hopefully be enough to get off the ground with *some* custom section support. The current semantics are that any constant tagged with `#[wasm_custom_section]` section will be *appended* to the corresponding section in the final output wasm artifact (and this affects dependencies linked in as well, not just the final crate). This means that whatever is interpreting the contents must be able to interpret binary-concatenated sections (or each constant needs to be in its own custom section). To test this change the existing `run-make` test suite was moved to a `run-make-fulldeps` folder and a new `run-make` test suite was added which applies to all targets by default. This test suite currently only has one test which only runs for the wasm target (using a node.js script to use `WebAssembly` in JS to parse the wasm output). --- src/bootstrap/builder.rs | 1 + src/bootstrap/compile.rs | 2 +- src/bootstrap/test.rs | 19 ++++-- src/librustc/dep_graph/dep_node.rs | 2 + src/librustc/hir/check_attr.rs | 13 ++++ src/librustc/middle/dead.rs | 5 ++ src/librustc/ty/maps/config.rs | 6 ++ src/librustc/ty/maps/mod.rs | 2 + src/librustc/ty/maps/plumbing.rs | 1 + src/librustc_metadata/cstore_impl.rs | 2 + src/librustc_metadata/decoder.rs | 10 +++ src/librustc_metadata/encoder.rs | 12 ++++ src/librustc_metadata/schema.rs | 1 + src/librustc_trans/attributes.rs | 32 ++++++++- src/librustc_trans/back/link.rs | 6 ++ src/librustc_trans/back/wasm.rs | 44 +++++++++++++ src/librustc_trans/base.rs | 66 +++++++++++++++++++ src/librustc_trans/lib.rs | 3 + src/librustc_typeck/check/mod.rs | 23 ++++++- src/libsyntax/feature_gate.rs | 8 +++ .../a-b-a-linker-guard/Makefile | 0 .../a-b-a-linker-guard/a.rs | 0 .../a-b-a-linker-guard/b.rs | 0 .../alloc-extern-crates/Makefile | 0 .../alloc-extern-crates/fakealloc.rs | 0 .../allow-non-lint-warnings-cmdline/Makefile | 0 .../allow-non-lint-warnings-cmdline/foo.rs | 0 .../allow-warnings-cmdline-stability/Makefile | 0 .../allow-warnings-cmdline-stability/bar.rs | 0 .../allow-warnings-cmdline-stability/foo.rs | 0 .../archive-duplicate-names/Makefile | 0 .../archive-duplicate-names/bar.c | 0 .../archive-duplicate-names/bar.rs | 0 .../archive-duplicate-names/foo.c | 0 .../archive-duplicate-names/foo.rs | 0 .../atomic-lock-free/Makefile | 0 .../atomic-lock-free/atomic_lock_free.rs | 0 .../bare-outfile/Makefile | 0 .../bare-outfile/foo.rs | 0 .../c-dynamic-dylib/Makefile | 0 .../c-dynamic-dylib/bar.rs | 0 .../c-dynamic-dylib/cfoo.c | 0 .../c-dynamic-dylib/foo.rs | 0 .../c-dynamic-rlib/Makefile | 0 .../c-dynamic-rlib/bar.rs | 0 .../c-dynamic-rlib/cfoo.c | 0 .../c-dynamic-rlib/foo.rs | 0 .../c-link-to-rust-dylib/Makefile | 0 .../c-link-to-rust-dylib/bar.c | 0 .../c-link-to-rust-dylib/foo.rs | 0 .../c-link-to-rust-staticlib/Makefile | 0 .../c-link-to-rust-staticlib/bar.c | 0 .../c-link-to-rust-staticlib/foo.rs | 0 .../c-static-dylib/Makefile | 0 .../c-static-dylib/bar.rs | 0 .../c-static-dylib/cfoo.c | 0 .../c-static-dylib/foo.rs | 0 .../c-static-rlib/Makefile | 0 .../c-static-rlib/bar.rs | 0 .../c-static-rlib/cfoo.c | 0 .../c-static-rlib/foo.rs | 0 .../cat-and-grep-sanity-check/Makefile | 0 .../cdylib-fewer-symbols/Makefile | 0 .../cdylib-fewer-symbols/foo.rs | 0 .../cdylib/Makefile | 0 .../cdylib/bar.rs | 0 .../cdylib/foo.c | 0 .../cdylib/foo.rs | 0 .../codegen-options-parsing/Makefile | 0 .../codegen-options-parsing/dummy.rs | 0 .../compile-stdin/Makefile | 0 .../compiler-lookup-paths-2/Makefile | 0 .../compiler-lookup-paths-2/a.rs | 0 .../compiler-lookup-paths-2/b.rs | 0 .../compiler-lookup-paths-2/c.rs | 0 .../compiler-lookup-paths/Makefile | 0 .../compiler-lookup-paths/a.rs | 0 .../compiler-lookup-paths/b.rs | 0 .../compiler-lookup-paths/c.rs | 0 .../compiler-lookup-paths/d.rs | 0 .../compiler-lookup-paths/e.rs | 0 .../compiler-lookup-paths/e2.rs | 0 .../compiler-lookup-paths/f.rs | 0 .../compiler-lookup-paths/native.c | 0 .../compiler-rt-works-on-mingw/Makefile | 0 .../compiler-rt-works-on-mingw/foo.cpp | 0 .../compiler-rt-works-on-mingw/foo.rs | 0 .../crate-data-smoke/Makefile | 0 .../crate-data-smoke/crate.rs | 0 .../crate-data-smoke/lib.rs | 0 .../crate-data-smoke/rlib.rs | 0 .../crate-name-priority/Makefile | 0 .../crate-name-priority/foo.rs | 0 .../crate-name-priority/foo1.rs | 0 .../debug-assertions/Makefile | 0 .../debug-assertions/debug.rs | 0 .../dep-info-doesnt-run-much/Makefile | 0 .../dep-info-doesnt-run-much/foo.rs | 0 .../dep-info-spaces/Makefile | 0 .../dep-info-spaces/Makefile.foo | 0 .../dep-info-spaces/bar.rs | 0 .../dep-info-spaces/foo foo.rs | 0 .../dep-info-spaces/lib.rs | 0 .../dep-info/Makefile | 0 .../dep-info/Makefile.foo | 0 .../dep-info/bar.rs | 0 .../dep-info/foo.rs | 0 .../dep-info/lib.rs | 0 .../dep-info/lib2.rs | 0 .../duplicate-output-flavors/Makefile | 0 .../duplicate-output-flavors/foo.rs | 0 .../dylib-chain/Makefile | 0 .../dylib-chain/m1.rs | 0 .../dylib-chain/m2.rs | 0 .../dylib-chain/m3.rs | 0 .../dylib-chain/m4.rs | 0 .../emit/Makefile | 0 .../emit/test-24876.rs | 0 .../emit/test-26235.rs | 0 .../Makefile | 0 .../bar.rs | 0 .../foo.rs | 0 .../error-writing-dependencies/Makefile | 0 .../error-writing-dependencies/foo.rs | 0 .../extern-diff-internal-name/Makefile | 0 .../extern-diff-internal-name/lib.rs | 0 .../extern-diff-internal-name/test.rs | 0 .../extern-flag-disambiguates/Makefile | 0 .../extern-flag-disambiguates/a.rs | 0 .../extern-flag-disambiguates/b.rs | 0 .../extern-flag-disambiguates/c.rs | 0 .../extern-flag-disambiguates/d.rs | 0 .../extern-flag-fun/Makefile | 0 .../extern-flag-fun/bar-alt.rs | 0 .../extern-flag-fun/bar.rs | 0 .../extern-flag-fun/foo.rs | 0 .../extern-fn-generic/Makefile | 0 .../extern-fn-generic/test.c | 0 .../extern-fn-generic/test.rs | 0 .../extern-fn-generic/testcrate.rs | 0 .../extern-fn-mangle/Makefile | 0 .../extern-fn-mangle/test.c | 0 .../extern-fn-mangle/test.rs | 0 .../extern-fn-reachable/Makefile | 0 .../extern-fn-reachable/dylib.rs | 0 .../extern-fn-reachable/main.rs | 0 .../extern-fn-struct-passing-abi/Makefile | 0 .../extern-fn-struct-passing-abi/test.c | 0 .../extern-fn-struct-passing-abi/test.rs | 0 .../extern-fn-with-extern-types/Makefile | 0 .../extern-fn-with-extern-types/ctest.c | 0 .../extern-fn-with-extern-types/test.rs | 0 .../extern-fn-with-packed-struct/Makefile | 0 .../extern-fn-with-packed-struct/test.c | 0 .../extern-fn-with-packed-struct/test.rs | 0 .../extern-fn-with-union/Makefile | 0 .../extern-fn-with-union/ctest.c | 0 .../extern-fn-with-union/test.rs | 0 .../extern-fn-with-union/testcrate.rs | 0 .../extern-multiple-copies/Makefile | 0 .../extern-multiple-copies/bar.rs | 0 .../extern-multiple-copies/foo1.rs | 0 .../extern-multiple-copies/foo2.rs | 0 .../extern-multiple-copies2/Makefile | 0 .../extern-multiple-copies2/bar.rs | 0 .../extern-multiple-copies2/foo1.rs | 0 .../extern-multiple-copies2/foo2.rs | 0 .../extern-overrides-distribution/Makefile | 0 .../extern-overrides-distribution/libc.rs | 0 .../extern-overrides-distribution/main.rs | 0 .../extra-filename-with-temp-outputs/Makefile | 0 .../extra-filename-with-temp-outputs/foo.rs | 0 .../fpic/Makefile | 0 .../fpic/hello.rs | 0 .../hir-tree/Makefile | 0 .../hir-tree/input.rs | 0 .../hotplug_codegen_backend/Makefile | 0 .../hotplug_codegen_backend/some_crate.rs | 0 .../hotplug_codegen_backend/the_backend.rs | 0 .../include_bytes_deps/Makefile | 0 .../include_bytes_deps/input.bin | 0 .../include_bytes_deps/input.md | 0 .../include_bytes_deps/input.txt | 0 .../include_bytes_deps/main.rs | 0 .../inline-always-many-cgu/Makefile | 0 .../inline-always-many-cgu/foo.rs | 0 .../interdependent-c-libraries/Makefile | 0 .../interdependent-c-libraries/bar.c | 0 .../interdependent-c-libraries/bar.rs | 0 .../interdependent-c-libraries/foo.c | 0 .../interdependent-c-libraries/foo.rs | 0 .../interdependent-c-libraries/main.rs | 0 .../intrinsic-unreachable/Makefile | 0 .../intrinsic-unreachable/exit-ret.rs | 0 .../intrinsic-unreachable/exit-unreachable.rs | 0 .../invalid-library/Makefile | 0 .../invalid-library/foo.rs | 0 .../invalid-staticlib/Makefile | 0 .../issue-11908/Makefile | 0 .../issue-11908/bar.rs | 0 .../issue-11908/foo.rs | 0 .../issue-14500/Makefile | 0 .../issue-14500/bar.rs | 0 .../issue-14500/foo.c | 0 .../issue-14500/foo.rs | 0 .../issue-14698/Makefile | 0 .../issue-14698/foo.rs | 0 .../issue-15460/Makefile | 0 .../issue-15460/bar.rs | 0 .../issue-15460/foo.c | 0 .../issue-15460/foo.rs | 0 .../issue-18943/Makefile | 0 .../issue-18943/foo.rs | 0 .../issue-19371/Makefile | 0 .../issue-19371/foo.rs | 0 .../issue-20626/Makefile | 0 .../issue-20626/foo.rs | 0 .../issue-22131/Makefile | 0 .../issue-22131/foo.rs | 0 .../issue-24445/Makefile | 0 .../issue-24445/foo.c | 0 .../issue-24445/foo.rs | 0 .../issue-25581/Makefile | 0 .../issue-25581/test.c | 0 .../issue-25581/test.rs | 0 .../issue-26006/Makefile | 0 .../issue-26006/in/libc/lib.rs | 0 .../issue-26006/in/time/lib.rs | 0 .../issue-26092/Makefile | 0 .../issue-26092/blank.rs | 0 .../issue-28595/Makefile | 0 .../issue-28595/a.c | 0 .../issue-28595/a.rs | 0 .../issue-28595/b.c | 0 .../issue-28595/b.rs | 0 .../issue-28766/Makefile | 0 .../issue-28766/foo.rs | 0 .../issue-28766/main.rs | 0 .../issue-30063/Makefile | 0 .../issue-30063/foo.rs | 0 .../issue-33329/Makefile | 0 .../issue-33329/main.rs | 0 .../issue-35164/Makefile | 0 .../issue-35164/main.rs | 0 .../issue-35164/submodule/mod.rs | 0 .../issue-37839/Makefile | 0 .../issue-37839/a.rs | 0 .../issue-37839/b.rs | 0 .../issue-37839/c.rs | 0 .../issue-37893/Makefile | 0 .../issue-37893/a.rs | 0 .../issue-37893/b.rs | 0 .../issue-37893/c.rs | 0 .../issue-38237/Makefile | 0 .../issue-38237/bar.rs | 0 .../issue-38237/baz.rs | 0 .../issue-38237/foo.rs | 0 .../issue-40535/Makefile | 0 .../issue-40535/bar.rs | 0 .../issue-40535/baz.rs | 0 .../issue-40535/foo.rs | 0 .../issue-46239/Makefile | 0 .../issue-46239/main.rs | 0 .../issue-7349/Makefile | 0 .../issue-7349/foo.rs | 0 .../issues-41478-43796/Makefile | 0 .../issues-41478-43796/a.rs | 0 .../libs-and-bins/Makefile | 0 .../libs-and-bins/foo.rs | 0 .../libs-through-symlinks/Makefile | 0 .../libs-through-symlinks/bar.rs | 0 .../libs-through-symlinks/foo.rs | 0 .../libtest-json/Makefile | 0 .../libtest-json/f.rs | 0 .../libtest-json/output.json | 0 .../libtest-json/validate_json.py | 0 .../link-arg/Makefile | 0 .../link-arg/empty.rs | 0 .../link-cfg/Makefile | 0 .../link-cfg/dep-with-staticlib.rs | 0 .../link-cfg/dep.rs | 0 .../link-cfg/no-deps.rs | 0 .../link-cfg/return1.c | 0 .../link-cfg/return2.c | 0 .../link-cfg/return3.c | 0 .../link-cfg/with-deps.rs | 0 .../link-cfg/with-staticlib-deps.rs | 0 .../link-path-order/Makefile | 0 .../link-path-order/correct.c | 0 .../link-path-order/main.rs | 0 .../link-path-order/wrong.c | 0 .../linkage-attr-on-static/Makefile | 0 .../linkage-attr-on-static/bar.rs | 0 .../linkage-attr-on-static/foo.c | 0 .../linker-output-non-utf8/Makefile | 0 .../linker-output-non-utf8/exec.rs | 0 .../linker-output-non-utf8/library.rs | 0 .../llvm-pass/Makefile | 0 .../llvm-pass/llvm-function-pass.so.cc | 0 .../llvm-pass/llvm-module-pass.so.cc | 0 .../llvm-pass/main.rs | 0 .../llvm-pass/plugin.rs | 0 .../Makefile | 0 .../long-linker-command-lines-cmd-exe/foo.bat | 0 .../long-linker-command-lines-cmd-exe/foo.rs | 0 .../long-linker-command-lines/Makefile | 0 .../long-linker-command-lines/foo.rs | 0 .../longjmp-across-rust/Makefile | 0 .../longjmp-across-rust/foo.c | 0 .../longjmp-across-rust/main.rs | 0 .../ls-metadata/Makefile | 0 .../ls-metadata/foo.rs | 0 .../lto-no-link-whole-rlib/Makefile | 0 .../lto-no-link-whole-rlib/bar.c | 0 .../lto-no-link-whole-rlib/foo.c | 0 .../lto-no-link-whole-rlib/lib1.rs | 0 .../lto-no-link-whole-rlib/lib2.rs | 0 .../lto-no-link-whole-rlib/main.rs | 0 .../lto-readonly-lib/Makefile | 0 .../lto-readonly-lib/lib.rs | 0 .../lto-readonly-lib/main.rs | 0 .../lto-smoke-c/Makefile | 0 .../lto-smoke-c/bar.c | 0 .../lto-smoke-c/foo.rs | 0 .../lto-smoke/Makefile | 0 .../lto-smoke/lib.rs | 0 .../lto-smoke/main.rs | 0 .../manual-crate-name/Makefile | 0 .../manual-crate-name/bar.rs | 0 .../manual-link/Makefile | 0 .../manual-link/bar.c | 0 .../manual-link/foo.c | 0 .../manual-link/foo.rs | 0 .../manual-link/main.rs | 0 .../many-crates-but-no-match/Makefile | 0 .../many-crates-but-no-match/crateA1.rs | 0 .../many-crates-but-no-match/crateA2.rs | 0 .../many-crates-but-no-match/crateA3.rs | 0 .../many-crates-but-no-match/crateB.rs | 0 .../many-crates-but-no-match/crateC.rs | 0 .../metadata-flag-frobs-symbols/Makefile | 0 .../metadata-flag-frobs-symbols/bar.rs | 0 .../metadata-flag-frobs-symbols/foo.rs | 0 .../min-global-align/Makefile | 0 .../min-global-align/min_global_align.rs | 0 .../mismatching-target-triples/Makefile | 0 .../mismatching-target-triples/bar.rs | 0 .../mismatching-target-triples/foo.rs | 0 .../missing-crate-dependency/Makefile | 0 .../missing-crate-dependency/crateA.rs | 0 .../missing-crate-dependency/crateB.rs | 0 .../missing-crate-dependency/crateC.rs | 0 .../mixing-deps/Makefile | 0 .../mixing-deps/both.rs | 0 .../mixing-deps/dylib.rs | 0 .../mixing-deps/prog.rs | 0 .../mixing-formats/Makefile | 0 .../mixing-formats/bar1.rs | 0 .../mixing-formats/bar2.rs | 0 .../mixing-formats/baz.rs | 0 .../mixing-formats/baz2.rs | 0 .../mixing-formats/foo.rs | 0 .../mixing-libs/Makefile | 0 .../mixing-libs/dylib.rs | 0 .../mixing-libs/prog.rs | 0 .../mixing-libs/rlib.rs | 0 .../msvc-opt-minsize/Makefile | 0 .../msvc-opt-minsize/foo.rs | 0 .../multiple-emits/Makefile | 0 .../multiple-emits/foo.rs | 0 .../no-builtins-lto/Makefile | 0 .../no-builtins-lto/main.rs | 0 .../no-builtins-lto/no_builtins.rs | 0 .../no-duplicate-libs/Makefile | 0 .../no-duplicate-libs/bar.c | 0 .../no-duplicate-libs/foo.c | 0 .../no-duplicate-libs/main.rs | 0 .../no-integrated-as/Makefile | 0 .../no-integrated-as/hello.rs | 0 .../no-intermediate-extras/Makefile | 0 .../no-intermediate-extras/foo.rs | 0 .../obey-crate-type-flag/Makefile | 0 .../obey-crate-type-flag/test.rs | 0 .../Makefile | 0 .../foo.rs | 0 .../output-filename-overwrites-input/Makefile | 0 .../output-filename-overwrites-input/bar.rs | 0 .../output-filename-overwrites-input/foo.rs | 0 .../output-type-permutations/Makefile | 0 .../output-type-permutations/foo.rs | 0 .../output-with-hyphens/Makefile | 0 .../output-with-hyphens/foo-bar.rs | 0 .../prefer-dylib/Makefile | 0 .../prefer-dylib/bar.rs | 0 .../prefer-dylib/foo.rs | 0 .../prefer-rlib/Makefile | 0 .../prefer-rlib/bar.rs | 0 .../prefer-rlib/foo.rs | 0 .../pretty-expanded-hygiene/Makefile | 0 .../pretty-expanded-hygiene/input.pp.rs | 0 .../pretty-expanded-hygiene/input.rs | 0 .../pretty-expanded/Makefile | 0 .../pretty-expanded/input.rs | 0 .../pretty-print-path-suffix/Makefile | 0 .../pretty-print-path-suffix/foo.pp | 0 .../pretty-print-path-suffix/foo_method.pp | 0 .../pretty-print-path-suffix/input.rs | 0 .../pretty-print-path-suffix/nest_foo.pp | 0 .../pretty-print-to-file/Makefile | 0 .../pretty-print-to-file/input.pp | 0 .../pretty-print-to-file/input.rs | 0 .../print-cfg/Makefile | 0 .../print-target-list/Makefile | 0 .../profile/Makefile | 0 .../profile/test.rs | 0 .../prune-link-args/Makefile | 0 .../prune-link-args/empty.rs | 0 .../relocation-model/Makefile | 0 .../relocation-model/foo.rs | 0 .../relro-levels/Makefile | 0 .../relro-levels/hello.rs | 0 .../reproducible-build/Makefile | 0 .../reproducible-build/linker.rs | 0 .../reproducible-build-aux.rs | 0 .../reproducible-build/reproducible-build.rs | 0 .../rlib-chain/Makefile | 0 .../rlib-chain/m1.rs | 0 .../rlib-chain/m2.rs | 0 .../rlib-chain/m3.rs | 0 .../rlib-chain/m4.rs | 0 .../rustc-macro-dep-files/Makefile | 0 .../rustc-macro-dep-files/bar.rs | 0 .../rustc-macro-dep-files/foo.rs | 0 .../rustdoc-error-lines/Makefile | 0 .../rustdoc-error-lines/input.rs | 0 .../rustdoc-output-path/Makefile | 0 .../rustdoc-output-path/foo.rs | 0 .../sanitizer-address/Makefile | 0 .../sanitizer-address/overflow.rs | 0 .../sanitizer-cdylib-link/Makefile | 0 .../sanitizer-cdylib-link/library.rs | 0 .../sanitizer-cdylib-link/program.rs | 0 .../sanitizer-dylib-link/Makefile | 0 .../sanitizer-dylib-link/library.rs | 0 .../sanitizer-dylib-link/program.rs | 0 .../sanitizer-invalid-cratetype/Makefile | 0 .../sanitizer-invalid-cratetype/hello.rs | 0 .../sanitizer-invalid-target/Makefile | 0 .../sanitizer-invalid-target/hello.rs | 0 .../sanitizer-leak/Makefile | 0 .../sanitizer-leak/leak.rs | 0 .../sanitizer-memory/Makefile | 0 .../sanitizer-memory/uninit.rs | 0 .../sanitizer-staticlib-link/Makefile | 0 .../sanitizer-staticlib-link/library.rs | 0 .../sanitizer-staticlib-link/program.c | 0 .../save-analysis-fail/Makefile | 0 .../save-analysis-fail/SameDir.rs | 0 .../save-analysis-fail/SameDir3.rs | 0 .../save-analysis-fail/SubDir/mod.rs | 0 .../save-analysis-fail/foo.rs | 0 .../save-analysis-fail/krate2.rs | 0 .../save-analysis/Makefile | 0 .../save-analysis/SameDir.rs | 0 .../save-analysis/SameDir3.rs | 0 .../save-analysis/SubDir/mod.rs | 0 .../save-analysis/extra-docs.md | 0 .../save-analysis/foo.rs | 0 .../save-analysis/krate2.rs | 0 .../sepcomp-cci-copies/Makefile | 0 .../sepcomp-cci-copies/cci_lib.rs | 0 .../sepcomp-cci-copies/foo.rs | 0 .../sepcomp-inlining/Makefile | 0 .../sepcomp-inlining/foo.rs | 0 .../sepcomp-separate/Makefile | 0 .../sepcomp-separate/foo.rs | 0 .../simd-ffi/Makefile | 0 .../simd-ffi/simd.rs | 0 .../simple-dylib/Makefile | 0 .../simple-dylib/bar.rs | 0 .../simple-dylib/foo.rs | 0 .../simple-rlib/Makefile | 0 .../simple-rlib/bar.rs | 0 .../simple-rlib/foo.rs | 0 .../stable-symbol-names/Makefile | 0 .../stable-symbol-names1.rs | 0 .../stable-symbol-names2.rs | 0 .../static-dylib-by-default/Makefile | 0 .../static-dylib-by-default/bar.rs | 0 .../static-dylib-by-default/foo.rs | 0 .../static-dylib-by-default/main.c | 0 .../static-nobundle/Makefile | 0 .../static-nobundle/aaa.c | 0 .../static-nobundle/bbb.rs | 0 .../static-nobundle/ccc.rs | 0 .../static-nobundle/ddd.rs | 0 .../static-unwinding/Makefile | 0 .../static-unwinding/lib.rs | 0 .../static-unwinding/main.rs | 0 .../staticlib-blank-lib/Makefile | 0 .../staticlib-blank-lib/foo.rs | 0 .../stdin-non-utf8/Makefile | 0 .../stdin-non-utf8/non-utf8 | 0 .../suspicious-library/Makefile | 0 .../suspicious-library/bar.rs | 0 .../suspicious-library/foo.rs | 0 .../symbol-visibility/Makefile | 0 .../symbol-visibility/a_cdylib.rs | 0 .../symbol-visibility/a_rust_dylib.rs | 0 .../symbol-visibility/an_executable.rs | 0 .../symbol-visibility/an_rlib.rs | 0 .../symbols-are-reasonable/Makefile | 0 .../symbols-are-reasonable/lib.rs | 0 .../symbols-include-type-name/Makefile | 0 .../symbols-include-type-name/lib.rs | 0 .../symlinked-extern/Makefile | 0 .../symlinked-extern/bar.rs | 0 .../symlinked-extern/baz.rs | 0 .../symlinked-extern/foo.rs | 0 .../symlinked-libraries/Makefile | 0 .../symlinked-libraries/bar.rs | 0 .../symlinked-libraries/foo.rs | 0 .../symlinked-rlib/Makefile | 0 .../symlinked-rlib/bar.rs | 0 .../symlinked-rlib/foo.rs | 0 .../sysroot-crates-are-unstable/Makefile | 0 .../sysroot-crates-are-unstable/test.py | 0 .../target-cpu-native/Makefile | 0 .../target-cpu-native/foo.rs | 0 .../target-specs/Makefile | 0 .../target-specs/foo.rs | 0 .../target-specs/my-awesome-platform.json | 0 .../target-specs/my-incomplete-platform.json | 0 .../target-specs/my-invalid-platform.json | 0 .../my-x86_64-unknown-linux-gnu-platform.json | 0 .../target-without-atomics/Makefile | 0 .../test-harness/Makefile | 0 .../test-harness/test-ignore-cfg.rs | 0 .../{run-make => run-make-fulldeps}/tools.mk | 0 .../treat-err-as-bug/Makefile | 0 .../treat-err-as-bug/err.rs | 0 .../type-mismatch-same-crate-name/Makefile | 0 .../type-mismatch-same-crate-name/crateA.rs | 0 .../type-mismatch-same-crate-name/crateB.rs | 0 .../type-mismatch-same-crate-name/crateC.rs | 0 .../use-extern-for-plugins/Makefile | 0 .../use-extern-for-plugins/bar.rs | 0 .../use-extern-for-plugins/baz.rs | 0 .../use-extern-for-plugins/foo.rs | 0 .../used/Makefile | 0 .../used/used.rs | 0 .../version/Makefile | 0 .../volatile-intrinsics/Makefile | 0 .../volatile-intrinsics/main.rs | 0 .../weird-output-filenames/Makefile | 0 .../weird-output-filenames/foo.rs | 0 .../windows-spawn/Makefile | 0 .../windows-spawn/hello.rs | 0 .../windows-spawn/spawn.rs | 0 .../windows-subsystem/Makefile | 0 .../windows-subsystem/console.rs | 0 .../windows-subsystem/windows.rs | 0 .../run-make/wasm-custom-section/Makefile | 10 +++ src/test/run-make/wasm-custom-section/bar.rs | 24 +++++++ src/test/run-make/wasm-custom-section/foo.js | 46 +++++++++++++ src/test/run-make/wasm-custom-section/foo.rs | 19 ++++++ .../ui/feature-gate-wasm_custom_section.rs | 14 ++++ .../feature-gate-wasm_custom_section.stderr | 11 ++++ src/test/ui/wasm-custom-section/malformed.rs | 19 ++++++ .../ui/wasm-custom-section/malformed.stderr | 14 ++++ src/test/ui/wasm-custom-section/not-const.rs | 29 ++++++++ .../ui/wasm-custom-section/not-const.stderr | 38 +++++++++++ src/test/ui/wasm-custom-section/not-slice.rs | 22 +++++++ .../ui/wasm-custom-section/not-slice.stderr | 20 ++++++ src/tools/compiletest/src/runtest.rs | 15 +++-- 575 files changed, 522 insertions(+), 17 deletions(-) create mode 100644 src/librustc_trans/back/wasm.rs rename src/test/{run-make => run-make-fulldeps}/a-b-a-linker-guard/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/a-b-a-linker-guard/a.rs (100%) rename src/test/{run-make => run-make-fulldeps}/a-b-a-linker-guard/b.rs (100%) rename src/test/{run-make => run-make-fulldeps}/alloc-extern-crates/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/alloc-extern-crates/fakealloc.rs (100%) rename src/test/{run-make => run-make-fulldeps}/allow-non-lint-warnings-cmdline/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/allow-non-lint-warnings-cmdline/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/allow-warnings-cmdline-stability/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/allow-warnings-cmdline-stability/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/allow-warnings-cmdline-stability/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/archive-duplicate-names/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/archive-duplicate-names/bar.c (100%) rename src/test/{run-make => run-make-fulldeps}/archive-duplicate-names/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/archive-duplicate-names/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/archive-duplicate-names/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/atomic-lock-free/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/atomic-lock-free/atomic_lock_free.rs (100%) rename src/test/{run-make => run-make-fulldeps}/bare-outfile/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/bare-outfile/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-dynamic-dylib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/c-dynamic-dylib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-dynamic-dylib/cfoo.c (100%) rename src/test/{run-make => run-make-fulldeps}/c-dynamic-dylib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-dynamic-rlib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/c-dynamic-rlib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-dynamic-rlib/cfoo.c (100%) rename src/test/{run-make => run-make-fulldeps}/c-dynamic-rlib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-link-to-rust-dylib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/c-link-to-rust-dylib/bar.c (100%) rename src/test/{run-make => run-make-fulldeps}/c-link-to-rust-dylib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-link-to-rust-staticlib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/c-link-to-rust-staticlib/bar.c (100%) rename src/test/{run-make => run-make-fulldeps}/c-link-to-rust-staticlib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-static-dylib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/c-static-dylib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-static-dylib/cfoo.c (100%) rename src/test/{run-make => run-make-fulldeps}/c-static-dylib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-static-rlib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/c-static-rlib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/c-static-rlib/cfoo.c (100%) rename src/test/{run-make => run-make-fulldeps}/c-static-rlib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/cat-and-grep-sanity-check/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/cdylib-fewer-symbols/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/cdylib-fewer-symbols/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/cdylib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/cdylib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/cdylib/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/cdylib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/codegen-options-parsing/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/codegen-options-parsing/dummy.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compile-stdin/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths-2/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths-2/a.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths-2/b.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths-2/c.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths/a.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths/b.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths/c.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths/d.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths/e.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths/e2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths/f.rs (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-lookup-paths/native.c (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-rt-works-on-mingw/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-rt-works-on-mingw/foo.cpp (100%) rename src/test/{run-make => run-make-fulldeps}/compiler-rt-works-on-mingw/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/crate-data-smoke/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/crate-data-smoke/crate.rs (100%) rename src/test/{run-make => run-make-fulldeps}/crate-data-smoke/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/crate-data-smoke/rlib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/crate-name-priority/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/crate-name-priority/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/crate-name-priority/foo1.rs (100%) rename src/test/{run-make => run-make-fulldeps}/debug-assertions/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/debug-assertions/debug.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info-doesnt-run-much/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info-doesnt-run-much/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info-spaces/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info-spaces/Makefile.foo (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info-spaces/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info-spaces/foo foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info-spaces/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info/Makefile.foo (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dep-info/lib2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/duplicate-output-flavors/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/duplicate-output-flavors/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dylib-chain/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/dylib-chain/m1.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dylib-chain/m2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dylib-chain/m3.rs (100%) rename src/test/{run-make => run-make-fulldeps}/dylib-chain/m4.rs (100%) rename src/test/{run-make => run-make-fulldeps}/emit/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/emit/test-24876.rs (100%) rename src/test/{run-make => run-make-fulldeps}/emit/test-26235.rs (100%) rename src/test/{run-make => run-make-fulldeps}/error-found-staticlib-instead-crate/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/error-found-staticlib-instead-crate/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/error-found-staticlib-instead-crate/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/error-writing-dependencies/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/error-writing-dependencies/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-diff-internal-name/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-diff-internal-name/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-diff-internal-name/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-flag-disambiguates/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-flag-disambiguates/a.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-flag-disambiguates/b.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-flag-disambiguates/c.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-flag-disambiguates/d.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-flag-fun/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-flag-fun/bar-alt.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-flag-fun/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-flag-fun/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-generic/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-generic/test.c (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-generic/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-generic/testcrate.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-mangle/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-mangle/test.c (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-mangle/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-reachable/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-reachable/dylib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-reachable/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-struct-passing-abi/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-struct-passing-abi/test.c (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-struct-passing-abi/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-extern-types/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-extern-types/ctest.c (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-extern-types/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-packed-struct/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-packed-struct/test.c (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-packed-struct/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-union/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-union/ctest.c (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-union/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-fn-with-union/testcrate.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-multiple-copies/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-multiple-copies/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-multiple-copies/foo1.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-multiple-copies/foo2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-multiple-copies2/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-multiple-copies2/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-multiple-copies2/foo1.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-multiple-copies2/foo2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-overrides-distribution/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extern-overrides-distribution/libc.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extern-overrides-distribution/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/extra-filename-with-temp-outputs/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/extra-filename-with-temp-outputs/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/fpic/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/fpic/hello.rs (100%) rename src/test/{run-make => run-make-fulldeps}/hir-tree/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/hir-tree/input.rs (100%) rename src/test/{run-make => run-make-fulldeps}/hotplug_codegen_backend/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/hotplug_codegen_backend/some_crate.rs (100%) rename src/test/{run-make => run-make-fulldeps}/hotplug_codegen_backend/the_backend.rs (100%) rename src/test/{run-make => run-make-fulldeps}/include_bytes_deps/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/include_bytes_deps/input.bin (100%) rename src/test/{run-make => run-make-fulldeps}/include_bytes_deps/input.md (100%) rename src/test/{run-make => run-make-fulldeps}/include_bytes_deps/input.txt (100%) rename src/test/{run-make => run-make-fulldeps}/include_bytes_deps/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/inline-always-many-cgu/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/inline-always-many-cgu/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/interdependent-c-libraries/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/interdependent-c-libraries/bar.c (100%) rename src/test/{run-make => run-make-fulldeps}/interdependent-c-libraries/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/interdependent-c-libraries/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/interdependent-c-libraries/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/interdependent-c-libraries/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/intrinsic-unreachable/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/intrinsic-unreachable/exit-ret.rs (100%) rename src/test/{run-make => run-make-fulldeps}/intrinsic-unreachable/exit-unreachable.rs (100%) rename src/test/{run-make => run-make-fulldeps}/invalid-library/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/invalid-library/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/invalid-staticlib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-11908/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-11908/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-11908/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-14500/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-14500/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-14500/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/issue-14500/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-14698/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-14698/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-15460/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-15460/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-15460/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/issue-15460/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-18943/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-18943/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-19371/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-19371/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-20626/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-20626/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-22131/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-22131/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-24445/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-24445/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/issue-24445/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-25581/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-25581/test.c (100%) rename src/test/{run-make => run-make-fulldeps}/issue-25581/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-26006/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-26006/in/libc/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-26006/in/time/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-26092/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-26092/blank.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-28595/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-28595/a.c (100%) rename src/test/{run-make => run-make-fulldeps}/issue-28595/a.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-28595/b.c (100%) rename src/test/{run-make => run-make-fulldeps}/issue-28595/b.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-28766/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-28766/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-28766/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-30063/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-30063/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-33329/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-33329/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-35164/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-35164/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-35164/submodule/mod.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-37839/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-37839/a.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-37839/b.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-37839/c.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-37893/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-37893/a.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-37893/b.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-37893/c.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-38237/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-38237/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-38237/baz.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-38237/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-40535/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-40535/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-40535/baz.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-40535/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-46239/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-46239/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issue-7349/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issue-7349/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/issues-41478-43796/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/issues-41478-43796/a.rs (100%) rename src/test/{run-make => run-make-fulldeps}/libs-and-bins/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/libs-and-bins/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/libs-through-symlinks/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/libs-through-symlinks/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/libs-through-symlinks/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/libtest-json/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/libtest-json/f.rs (100%) rename src/test/{run-make => run-make-fulldeps}/libtest-json/output.json (100%) rename src/test/{run-make => run-make-fulldeps}/libtest-json/validate_json.py (100%) rename src/test/{run-make => run-make-fulldeps}/link-arg/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/link-arg/empty.rs (100%) rename src/test/{run-make => run-make-fulldeps}/link-cfg/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/link-cfg/dep-with-staticlib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/link-cfg/dep.rs (100%) rename src/test/{run-make => run-make-fulldeps}/link-cfg/no-deps.rs (100%) rename src/test/{run-make => run-make-fulldeps}/link-cfg/return1.c (100%) rename src/test/{run-make => run-make-fulldeps}/link-cfg/return2.c (100%) rename src/test/{run-make => run-make-fulldeps}/link-cfg/return3.c (100%) rename src/test/{run-make => run-make-fulldeps}/link-cfg/with-deps.rs (100%) rename src/test/{run-make => run-make-fulldeps}/link-cfg/with-staticlib-deps.rs (100%) rename src/test/{run-make => run-make-fulldeps}/link-path-order/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/link-path-order/correct.c (100%) rename src/test/{run-make => run-make-fulldeps}/link-path-order/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/link-path-order/wrong.c (100%) rename src/test/{run-make => run-make-fulldeps}/linkage-attr-on-static/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/linkage-attr-on-static/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/linkage-attr-on-static/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/linker-output-non-utf8/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/linker-output-non-utf8/exec.rs (100%) rename src/test/{run-make => run-make-fulldeps}/linker-output-non-utf8/library.rs (100%) rename src/test/{run-make => run-make-fulldeps}/llvm-pass/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/llvm-pass/llvm-function-pass.so.cc (100%) rename src/test/{run-make => run-make-fulldeps}/llvm-pass/llvm-module-pass.so.cc (100%) rename src/test/{run-make => run-make-fulldeps}/llvm-pass/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/llvm-pass/plugin.rs (100%) rename src/test/{run-make => run-make-fulldeps}/long-linker-command-lines-cmd-exe/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/long-linker-command-lines-cmd-exe/foo.bat (100%) rename src/test/{run-make => run-make-fulldeps}/long-linker-command-lines-cmd-exe/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/long-linker-command-lines/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/long-linker-command-lines/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/longjmp-across-rust/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/longjmp-across-rust/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/longjmp-across-rust/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/ls-metadata/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/ls-metadata/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/lto-no-link-whole-rlib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/lto-no-link-whole-rlib/bar.c (100%) rename src/test/{run-make => run-make-fulldeps}/lto-no-link-whole-rlib/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/lto-no-link-whole-rlib/lib1.rs (100%) rename src/test/{run-make => run-make-fulldeps}/lto-no-link-whole-rlib/lib2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/lto-no-link-whole-rlib/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/lto-readonly-lib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/lto-readonly-lib/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/lto-readonly-lib/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/lto-smoke-c/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/lto-smoke-c/bar.c (100%) rename src/test/{run-make => run-make-fulldeps}/lto-smoke-c/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/lto-smoke/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/lto-smoke/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/lto-smoke/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/manual-crate-name/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/manual-crate-name/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/manual-link/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/manual-link/bar.c (100%) rename src/test/{run-make => run-make-fulldeps}/manual-link/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/manual-link/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/manual-link/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/many-crates-but-no-match/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/many-crates-but-no-match/crateA1.rs (100%) rename src/test/{run-make => run-make-fulldeps}/many-crates-but-no-match/crateA2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/many-crates-but-no-match/crateA3.rs (100%) rename src/test/{run-make => run-make-fulldeps}/many-crates-but-no-match/crateB.rs (100%) rename src/test/{run-make => run-make-fulldeps}/many-crates-but-no-match/crateC.rs (100%) rename src/test/{run-make => run-make-fulldeps}/metadata-flag-frobs-symbols/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/metadata-flag-frobs-symbols/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/metadata-flag-frobs-symbols/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/min-global-align/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/min-global-align/min_global_align.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mismatching-target-triples/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/mismatching-target-triples/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mismatching-target-triples/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/missing-crate-dependency/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/missing-crate-dependency/crateA.rs (100%) rename src/test/{run-make => run-make-fulldeps}/missing-crate-dependency/crateB.rs (100%) rename src/test/{run-make => run-make-fulldeps}/missing-crate-dependency/crateC.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-deps/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-deps/both.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-deps/dylib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-deps/prog.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-formats/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-formats/bar1.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-formats/bar2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-formats/baz.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-formats/baz2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-formats/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-libs/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-libs/dylib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-libs/prog.rs (100%) rename src/test/{run-make => run-make-fulldeps}/mixing-libs/rlib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/msvc-opt-minsize/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/msvc-opt-minsize/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/multiple-emits/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/multiple-emits/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/no-builtins-lto/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/no-builtins-lto/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/no-builtins-lto/no_builtins.rs (100%) rename src/test/{run-make => run-make-fulldeps}/no-duplicate-libs/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/no-duplicate-libs/bar.c (100%) rename src/test/{run-make => run-make-fulldeps}/no-duplicate-libs/foo.c (100%) rename src/test/{run-make => run-make-fulldeps}/no-duplicate-libs/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/no-integrated-as/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/no-integrated-as/hello.rs (100%) rename src/test/{run-make => run-make-fulldeps}/no-intermediate-extras/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/no-intermediate-extras/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/obey-crate-type-flag/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/obey-crate-type-flag/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/output-filename-conflicts-with-directory/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/output-filename-conflicts-with-directory/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/output-filename-overwrites-input/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/output-filename-overwrites-input/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/output-filename-overwrites-input/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/output-type-permutations/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/output-type-permutations/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/output-with-hyphens/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/output-with-hyphens/foo-bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/prefer-dylib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/prefer-dylib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/prefer-dylib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/prefer-rlib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/prefer-rlib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/prefer-rlib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-expanded-hygiene/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-expanded-hygiene/input.pp.rs (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-expanded-hygiene/input.rs (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-expanded/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-expanded/input.rs (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-print-path-suffix/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-print-path-suffix/foo.pp (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-print-path-suffix/foo_method.pp (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-print-path-suffix/input.rs (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-print-path-suffix/nest_foo.pp (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-print-to-file/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-print-to-file/input.pp (100%) rename src/test/{run-make => run-make-fulldeps}/pretty-print-to-file/input.rs (100%) rename src/test/{run-make => run-make-fulldeps}/print-cfg/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/print-target-list/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/profile/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/profile/test.rs (100%) rename src/test/{run-make => run-make-fulldeps}/prune-link-args/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/prune-link-args/empty.rs (100%) rename src/test/{run-make => run-make-fulldeps}/relocation-model/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/relocation-model/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/relro-levels/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/relro-levels/hello.rs (100%) rename src/test/{run-make => run-make-fulldeps}/reproducible-build/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/reproducible-build/linker.rs (100%) rename src/test/{run-make => run-make-fulldeps}/reproducible-build/reproducible-build-aux.rs (100%) rename src/test/{run-make => run-make-fulldeps}/reproducible-build/reproducible-build.rs (100%) rename src/test/{run-make => run-make-fulldeps}/rlib-chain/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/rlib-chain/m1.rs (100%) rename src/test/{run-make => run-make-fulldeps}/rlib-chain/m2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/rlib-chain/m3.rs (100%) rename src/test/{run-make => run-make-fulldeps}/rlib-chain/m4.rs (100%) rename src/test/{run-make => run-make-fulldeps}/rustc-macro-dep-files/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/rustc-macro-dep-files/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/rustc-macro-dep-files/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/rustdoc-error-lines/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/rustdoc-error-lines/input.rs (100%) rename src/test/{run-make => run-make-fulldeps}/rustdoc-output-path/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/rustdoc-output-path/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-address/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-address/overflow.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-cdylib-link/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-cdylib-link/library.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-cdylib-link/program.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-dylib-link/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-dylib-link/library.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-dylib-link/program.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-invalid-cratetype/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-invalid-cratetype/hello.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-invalid-target/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-invalid-target/hello.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-leak/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-leak/leak.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-memory/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-memory/uninit.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-staticlib-link/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-staticlib-link/library.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sanitizer-staticlib-link/program.c (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis-fail/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis-fail/SameDir.rs (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis-fail/SameDir3.rs (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis-fail/SubDir/mod.rs (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis-fail/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis-fail/krate2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis/SameDir.rs (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis/SameDir3.rs (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis/SubDir/mod.rs (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis/extra-docs.md (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/save-analysis/krate2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sepcomp-cci-copies/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sepcomp-cci-copies/cci_lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sepcomp-cci-copies/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sepcomp-inlining/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sepcomp-inlining/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sepcomp-separate/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sepcomp-separate/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/simd-ffi/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/simd-ffi/simd.rs (100%) rename src/test/{run-make => run-make-fulldeps}/simple-dylib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/simple-dylib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/simple-dylib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/simple-rlib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/simple-rlib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/simple-rlib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/stable-symbol-names/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/stable-symbol-names/stable-symbol-names1.rs (100%) rename src/test/{run-make => run-make-fulldeps}/stable-symbol-names/stable-symbol-names2.rs (100%) rename src/test/{run-make => run-make-fulldeps}/static-dylib-by-default/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/static-dylib-by-default/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/static-dylib-by-default/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/static-dylib-by-default/main.c (100%) rename src/test/{run-make => run-make-fulldeps}/static-nobundle/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/static-nobundle/aaa.c (100%) rename src/test/{run-make => run-make-fulldeps}/static-nobundle/bbb.rs (100%) rename src/test/{run-make => run-make-fulldeps}/static-nobundle/ccc.rs (100%) rename src/test/{run-make => run-make-fulldeps}/static-nobundle/ddd.rs (100%) rename src/test/{run-make => run-make-fulldeps}/static-unwinding/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/static-unwinding/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/static-unwinding/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/staticlib-blank-lib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/staticlib-blank-lib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/stdin-non-utf8/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/stdin-non-utf8/non-utf8 (100%) rename src/test/{run-make => run-make-fulldeps}/suspicious-library/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/suspicious-library/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/suspicious-library/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symbol-visibility/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/symbol-visibility/a_cdylib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symbol-visibility/a_rust_dylib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symbol-visibility/an_executable.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symbol-visibility/an_rlib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symbols-are-reasonable/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/symbols-are-reasonable/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symbols-include-type-name/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/symbols-include-type-name/lib.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-extern/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-extern/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-extern/baz.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-extern/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-libraries/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-libraries/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-libraries/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-rlib/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-rlib/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/symlinked-rlib/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/sysroot-crates-are-unstable/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/sysroot-crates-are-unstable/test.py (100%) rename src/test/{run-make => run-make-fulldeps}/target-cpu-native/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/target-cpu-native/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/target-specs/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/target-specs/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/target-specs/my-awesome-platform.json (100%) rename src/test/{run-make => run-make-fulldeps}/target-specs/my-incomplete-platform.json (100%) rename src/test/{run-make => run-make-fulldeps}/target-specs/my-invalid-platform.json (100%) rename src/test/{run-make => run-make-fulldeps}/target-specs/my-x86_64-unknown-linux-gnu-platform.json (100%) rename src/test/{run-make => run-make-fulldeps}/target-without-atomics/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/test-harness/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/test-harness/test-ignore-cfg.rs (100%) rename src/test/{run-make => run-make-fulldeps}/tools.mk (100%) rename src/test/{run-make => run-make-fulldeps}/treat-err-as-bug/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/treat-err-as-bug/err.rs (100%) rename src/test/{run-make => run-make-fulldeps}/type-mismatch-same-crate-name/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/type-mismatch-same-crate-name/crateA.rs (100%) rename src/test/{run-make => run-make-fulldeps}/type-mismatch-same-crate-name/crateB.rs (100%) rename src/test/{run-make => run-make-fulldeps}/type-mismatch-same-crate-name/crateC.rs (100%) rename src/test/{run-make => run-make-fulldeps}/use-extern-for-plugins/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/use-extern-for-plugins/bar.rs (100%) rename src/test/{run-make => run-make-fulldeps}/use-extern-for-plugins/baz.rs (100%) rename src/test/{run-make => run-make-fulldeps}/use-extern-for-plugins/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/used/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/used/used.rs (100%) rename src/test/{run-make => run-make-fulldeps}/version/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/volatile-intrinsics/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/volatile-intrinsics/main.rs (100%) rename src/test/{run-make => run-make-fulldeps}/weird-output-filenames/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/weird-output-filenames/foo.rs (100%) rename src/test/{run-make => run-make-fulldeps}/windows-spawn/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/windows-spawn/hello.rs (100%) rename src/test/{run-make => run-make-fulldeps}/windows-spawn/spawn.rs (100%) rename src/test/{run-make => run-make-fulldeps}/windows-subsystem/Makefile (100%) rename src/test/{run-make => run-make-fulldeps}/windows-subsystem/console.rs (100%) rename src/test/{run-make => run-make-fulldeps}/windows-subsystem/windows.rs (100%) create mode 100644 src/test/run-make/wasm-custom-section/Makefile create mode 100644 src/test/run-make/wasm-custom-section/bar.rs create mode 100644 src/test/run-make/wasm-custom-section/foo.js create mode 100644 src/test/run-make/wasm-custom-section/foo.rs create mode 100644 src/test/ui/feature-gate-wasm_custom_section.rs create mode 100644 src/test/ui/feature-gate-wasm_custom_section.stderr create mode 100644 src/test/ui/wasm-custom-section/malformed.rs create mode 100644 src/test/ui/wasm-custom-section/malformed.stderr create mode 100644 src/test/ui/wasm-custom-section/not-const.rs create mode 100644 src/test/ui/wasm-custom-section/not-const.stderr create mode 100644 src/test/ui/wasm-custom-section/not-slice.rs create mode 100644 src/test/ui/wasm-custom-section/not-slice.stderr diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index a398bcc973746..2e094a8898206 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -313,6 +313,7 @@ impl<'a> Builder<'a> { test::RunPassFullDepsPretty, test::RunFailFullDepsPretty, test::Crate, test::CrateLibrustc, test::CrateRustdoc, test::Linkcheck, test::Cargotest, test::Cargo, test::Rls, test::ErrorIndex, test::Distcheck, + test::RunMakeFullDeps, test::Nomicon, test::Reference, test::RustdocBook, test::RustByExample, test::TheBook, test::UnstableBook, test::Rustfmt, test::Miri, test::Clippy, test::RustdocJS, test::RustdocTheme, diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 86263c8fa0733..2640248373c3d 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -915,7 +915,7 @@ impl Step for Assemble { } } - let lld_install = if build.config.lld_enabled && target_compiler.stage > 0 { + let lld_install = if build.config.lld_enabled { Some(builder.ensure(native::Lld { target: target_compiler.host, })) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index de938ec8e8306..6c19da4648a29 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -759,12 +759,18 @@ test!(RunFailFullDepsPretty { host: true }); -host_test!(RunMake { +default_test!(RunMake { path: "src/test/run-make", mode: "run-make", suite: "run-make" }); +host_test!(RunMakeFullDeps { + path: "src/test/run-make-fulldeps", + mode: "run-make", + suite: "run-make-fulldeps" +}); + #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] struct Compiletest { compiler: Compiler, @@ -827,8 +833,7 @@ impl Step for Compiletest { // FIXME: Does pretty need librustc compiled? Note that there are // fulldeps test suites with mode = pretty as well. mode == "pretty" || - mode == "rustdoc" || - mode == "run-make" { + mode == "rustdoc" { builder.ensure(compile::Rustc { compiler, target }); } @@ -849,7 +854,7 @@ impl Step for Compiletest { cmd.arg("--rustc-path").arg(builder.rustc(compiler)); // Avoid depending on rustdoc when we don't need it. - if mode == "rustdoc" || mode == "run-make" { + if mode == "rustdoc" || (mode == "run-make" && suite.ends_with("fulldeps")) { cmd.arg("--rustdoc-path").arg(builder.rustdoc(compiler.host)); } @@ -931,7 +936,7 @@ impl Step for Compiletest { // Only pass correct values for these flags for the `run-make` suite as it // requires that a C++ compiler was configured which isn't always the case. - if suite == "run-make" { + if suite == "run-make-fulldeps" { let llvm_components = output(Command::new(&llvm_config).arg("--components")); let llvm_cxxflags = output(Command::new(&llvm_config).arg("--cxxflags")); cmd.arg("--cc").arg(build.cc(target)) @@ -944,12 +949,12 @@ impl Step for Compiletest { } } } - if suite == "run-make" && !build.config.llvm_enabled { + if suite == "run-make-fulldeps" && !build.config.llvm_enabled { println!("Ignoring run-make test suite as they generally don't work without LLVM"); return; } - if suite != "run-make" { + if suite != "run-make-fulldeps" { cmd.arg("--cc").arg("") .arg("--cxx").arg("") .arg("--cflags").arg("") diff --git a/src/librustc/dep_graph/dep_node.rs b/src/librustc/dep_graph/dep_node.rs index 1e2e4e5a69fa1..09d7ce599ab03 100644 --- a/src/librustc/dep_graph/dep_node.rs +++ b/src/librustc/dep_graph/dep_node.rs @@ -650,6 +650,8 @@ define_dep_nodes!( <'tcx> [] GetSymbolExportLevel(DefId), + [] WasmCustomSections(CrateNum), + [input] Features, [] ProgramClausesFor(DefId), diff --git a/src/librustc/hir/check_attr.rs b/src/librustc/hir/check_attr.rs index d7194e9c2cabb..f141cac161483 100644 --- a/src/librustc/hir/check_attr.rs +++ b/src/librustc/hir/check_attr.rs @@ -25,6 +25,7 @@ enum Target { Struct, Union, Enum, + Const, Other, } @@ -35,6 +36,7 @@ impl Target { hir::ItemStruct(..) => Target::Struct, hir::ItemUnion(..) => Target::Union, hir::ItemEnum(..) => Target::Enum, + hir::ItemConst(..) => Target::Const, _ => Target::Other, } } @@ -60,6 +62,17 @@ impl<'a, 'tcx> CheckAttrVisitor<'a, 'tcx> { if name == "inline" { self.check_inline(attr, item, target) } + + if name == "wasm_custom_section" { + if target != Target::Const { + self.tcx.sess.span_err(attr.span, "only allowed on consts"); + } + + if attr.value_str().is_none() { + self.tcx.sess.span_err(attr.span, "must be of the form \ + #[wasm_custom_section = \"foo\"]"); + } + } } } diff --git a/src/librustc/middle/dead.rs b/src/librustc/middle/dead.rs index 1ff9c7a86291e..abd52624c30d4 100644 --- a/src/librustc/middle/dead.rs +++ b/src/librustc/middle/dead.rs @@ -318,6 +318,11 @@ fn has_allow_dead_code_or_lang_attr(tcx: TyCtxt, return true; } + // These constants are special for wasm + if attr::contains_name(attrs, "wasm_custom_section") { + return true; + } + tcx.lint_level_at_node(lint::builtin::DEAD_CODE, id).0 == lint::Allow } diff --git a/src/librustc/ty/maps/config.rs b/src/librustc/ty/maps/config.rs index 117d921931235..0b41c3ab2fa20 100644 --- a/src/librustc/ty/maps/config.rs +++ b/src/librustc/ty/maps/config.rs @@ -678,6 +678,12 @@ impl<'tcx> QueryDescription<'tcx> for queries::instance_def_size_estimate<'tcx> } } +impl<'tcx> QueryDescription<'tcx> for queries::wasm_custom_sections<'tcx> { + fn describe(_tcx: TyCtxt, _: CrateNum) -> String { + format!("custom wasm sections for a crate") + } +} + impl<'tcx> QueryDescription<'tcx> for queries::generics_of<'tcx> { #[inline] fn cache_on_disk(def_id: Self::Key) -> bool { diff --git a/src/librustc/ty/maps/mod.rs b/src/librustc/ty/maps/mod.rs index 6c3b4efb932ad..2b4c1992762ea 100644 --- a/src/librustc/ty/maps/mod.rs +++ b/src/librustc/ty/maps/mod.rs @@ -424,6 +424,8 @@ define_maps! { <'tcx> [] fn features_query: features_node(CrateNum) -> Lrc, [] fn program_clauses_for: ProgramClausesFor(DefId) -> Lrc>>, + + [] fn wasm_custom_sections: WasmCustomSections(CrateNum) -> Lrc>, } ////////////////////////////////////////////////////////////////////// diff --git a/src/librustc/ty/maps/plumbing.rs b/src/librustc/ty/maps/plumbing.rs index 4170fa7679716..910c00b832ef8 100644 --- a/src/librustc/ty/maps/plumbing.rs +++ b/src/librustc/ty/maps/plumbing.rs @@ -940,6 +940,7 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>, DepKind::Features => { force!(features_query, LOCAL_CRATE); } DepKind::ProgramClausesFor => { force!(program_clauses_for, def_id!()); } + DepKind::WasmCustomSections => { force!(wasm_custom_sections, krate!()); } } true diff --git a/src/librustc_metadata/cstore_impl.rs b/src/librustc_metadata/cstore_impl.rs index 2de27f3a1c3ea..3c2f984ef8b3f 100644 --- a/src/librustc_metadata/cstore_impl.rs +++ b/src/librustc_metadata/cstore_impl.rs @@ -271,6 +271,8 @@ provide! { <'tcx> tcx, def_id, other, cdata, Arc::new(cdata.exported_symbols()) } + + wasm_custom_sections => { Lrc::new(cdata.wasm_custom_sections()) } } pub fn provide<'tcx>(providers: &mut Providers<'tcx>) { diff --git a/src/librustc_metadata/decoder.rs b/src/librustc_metadata/decoder.rs index b0c945fbf2a05..0e5df3142af64 100644 --- a/src/librustc_metadata/decoder.rs +++ b/src/librustc_metadata/decoder.rs @@ -1067,6 +1067,16 @@ impl<'a, 'tcx> CrateMetadata { .collect() } + pub fn wasm_custom_sections(&self) -> Vec { + let sections = self.root + .wasm_custom_sections + .decode(self) + .map(|def_index| self.local_def_id(def_index)) + .collect::>(); + info!("loaded wasm sections {:?}", sections); + return sections + } + pub fn get_macro(&self, id: DefIndex) -> (InternedString, MacroDef) { let entry = self.entry(id); match entry.kind { diff --git a/src/librustc_metadata/encoder.rs b/src/librustc_metadata/encoder.rs index 6b3453f2c99e8..56981b8f4a1e9 100644 --- a/src/librustc_metadata/encoder.rs +++ b/src/librustc_metadata/encoder.rs @@ -435,6 +435,12 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { &exported_symbols); let exported_symbols_bytes = self.position() - i; + // encode wasm custom sections + let wasm_custom_sections = self.tcx.wasm_custom_sections(LOCAL_CRATE); + let wasm_custom_sections = self.tracked( + IsolatedEncoder::encode_wasm_custom_sections, + &wasm_custom_sections); + // Encode and index the items. i = self.position(); let items = self.encode_info_for_items(); @@ -478,6 +484,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { def_path_table, impls, exported_symbols, + wasm_custom_sections, index, }); @@ -1444,6 +1451,11 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> { .cloned()) } + fn encode_wasm_custom_sections(&mut self, statics: &[DefId]) -> LazySeq { + info!("encoding custom wasm section constants {:?}", statics); + self.lazy_seq(statics.iter().map(|id| id.index)) + } + fn encode_dylib_dependency_formats(&mut self, _: ()) -> LazySeq> { match self.tcx.sess.dependency_formats.borrow().get(&config::CrateTypeDylib) { Some(arr) => { diff --git a/src/librustc_metadata/schema.rs b/src/librustc_metadata/schema.rs index 593f08e90bb3b..001772623e75b 100644 --- a/src/librustc_metadata/schema.rs +++ b/src/librustc_metadata/schema.rs @@ -204,6 +204,7 @@ pub struct CrateRoot { pub def_path_table: Lazy, pub impls: LazySeq, pub exported_symbols: LazySeq<(ExportedSymbol, SymbolExportLevel)>, + pub wasm_custom_sections: LazySeq, pub index: LazySeq, } diff --git a/src/librustc_trans/attributes.rs b/src/librustc_trans/attributes.rs index 040d9455334bc..16253aa92acc7 100644 --- a/src/librustc_trans/attributes.rs +++ b/src/librustc_trans/attributes.rs @@ -11,9 +11,11 @@ use std::ffi::{CStr, CString}; -use rustc::hir::TransFnAttrFlags; +use rustc::hir::{self, TransFnAttrFlags}; use rustc::hir::def_id::{DefId, LOCAL_CRATE}; +use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::session::config::Sanitizer; +use rustc::ty::TyCtxt; use rustc::ty::maps::Providers; use rustc_data_structures::sync::Lrc; @@ -161,4 +163,32 @@ pub fn provide(providers: &mut Providers) { .collect()) } }; + + providers.wasm_custom_sections = |tcx, cnum| { + assert_eq!(cnum, LOCAL_CRATE); + let mut finder = WasmSectionFinder { tcx, list: Vec::new() }; + tcx.hir.krate().visit_all_item_likes(&mut finder); + Lrc::new(finder.list) + }; +} + +struct WasmSectionFinder<'a, 'tcx: 'a> { + tcx: TyCtxt<'a, 'tcx, 'tcx>, + list: Vec, +} + +impl<'a, 'tcx: 'a> ItemLikeVisitor<'tcx> for WasmSectionFinder<'a, 'tcx> { + fn visit_item(&mut self, i: &'tcx hir::Item) { + match i.node { + hir::ItemConst(..) => {} + _ => return, + } + if i.attrs.iter().any(|i| i.check_name("wasm_custom_section")) { + self.list.push(self.tcx.hir.local_def_id(i.id)); + } + } + + fn visit_trait_item(&mut self, _: &'tcx hir::TraitItem) {} + + fn visit_impl_item(&mut self, _: &'tcx hir::ImplItem) {} } diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index bdda7741221f5..8e8ba823b6f8d 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +use back::wasm; use cc::windows_registry; use super::archive::{ArchiveBuilder, ArchiveConfig}; use super::bytecode::RLIB_BYTECODE_EXTENSION; @@ -810,6 +811,11 @@ fn link_natively(sess: &Session, Err(e) => sess.fatal(&format!("failed to run dsymutil: {}", e)), } } + + if sess.opts.target_triple == "wasm32-unknown-unknown" { + wasm::add_custom_sections(&out_filename, + &trans.crate_info.wasm_custom_sections); + } } fn exec_linker(sess: &Session, cmd: &mut Command, tmpdir: &Path) diff --git a/src/librustc_trans/back/wasm.rs b/src/librustc_trans/back/wasm.rs new file mode 100644 index 0000000000000..99f1e4b7e78fe --- /dev/null +++ b/src/librustc_trans/back/wasm.rs @@ -0,0 +1,44 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use std::fs; +use std::path::Path; +use std::collections::BTreeMap; + +use serialize::leb128; + +pub fn add_custom_sections(path: &Path, sections: &BTreeMap>) { + let mut wasm = fs::read(path).expect("failed to read wasm output"); + + // see https://webassembly.github.io/spec/core/binary/modules.html#custom-section + for (section, bytes) in sections { + // write the `id` identifier, 0 for a custom section + let len = wasm.len(); + leb128::write_u32_leb128(&mut wasm, len, 0); + + // figure out how long our name descriptor will be + let mut name = Vec::new(); + leb128::write_u32_leb128(&mut name, 0, section.len() as u32); + name.extend_from_slice(section.as_bytes()); + + // write the length of the payload + let len = wasm.len(); + let total_len = bytes.len() + name.len(); + leb128::write_u32_leb128(&mut wasm, len, total_len as u32); + + // write out the name section + wasm.extend(name); + + // and now the payload itself + wasm.extend_from_slice(bytes); + } + + fs::write(path, &wasm).expect("failed to write wasm output"); +} diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs index 4da082e9d50f1..11f952bc5bc77 100644 --- a/src/librustc_trans/base.rs +++ b/src/librustc_trans/base.rs @@ -74,6 +74,7 @@ use rustc::util::nodemap::{FxHashMap, FxHashSet, DefIdSet}; use CrateInfo; use std::any::Any; +use std::collections::BTreeMap; use std::ffi::CString; use std::str; use std::sync::Arc; @@ -1070,8 +1071,24 @@ impl CrateInfo { used_crates_dynamic: cstore::used_crates(tcx, LinkagePreference::RequireDynamic), used_crates_static: cstore::used_crates(tcx, LinkagePreference::RequireStatic), used_crate_source: FxHashMap(), + wasm_custom_sections: BTreeMap::new(), }; + let load_wasm_sections = tcx.sess.crate_types.borrow() + .iter() + .any(|c| *c != config::CrateTypeRlib) && + tcx.sess.opts.target_triple == "wasm32-unknown-unknown"; + + if load_wasm_sections { + info!("attempting to load all wasm sections"); + for &id in tcx.wasm_custom_sections(LOCAL_CRATE).iter() { + let (name, contents) = fetch_wasm_section(tcx, id); + info.wasm_custom_sections.entry(name) + .or_insert(Vec::new()) + .extend(contents); + } + } + for &cnum in tcx.crates().iter() { info.native_libraries.insert(cnum, tcx.native_libraries(cnum)); info.crate_name.insert(cnum, tcx.crate_name(cnum).to_string()); @@ -1091,6 +1108,14 @@ impl CrateInfo { if tcx.is_no_builtins(cnum) { info.is_no_builtins.insert(cnum); } + if load_wasm_sections { + for &id in tcx.wasm_custom_sections(cnum).iter() { + let (name, contents) = fetch_wasm_section(tcx, id); + info.wasm_custom_sections.entry(name) + .or_insert(Vec::new()) + .extend(contents); + } + } } @@ -1270,3 +1295,44 @@ mod temp_stable_hash_impls { } } } + +fn fetch_wasm_section(tcx: TyCtxt, id: DefId) -> (String, Vec) { + use rustc::mir::interpret::{GlobalId, Value, PrimVal}; + use rustc::middle::const_val::ConstVal; + + info!("loading wasm section {:?}", id); + + let section = tcx.get_attrs(id) + .iter() + .find(|a| a.check_name("wasm_custom_section")) + .expect("missing #[wasm_custom_section] attribute") + .value_str() + .expect("malformed #[wasm_custom_section] attribute"); + + let instance = ty::Instance::mono(tcx, id); + let cid = GlobalId { + instance, + promoted: None + }; + let param_env = ty::ParamEnv::reveal_all(); + let val = tcx.const_eval(param_env.and(cid)).unwrap(); + + let val = match val.val { + ConstVal::Value(val) => val, + ConstVal::Unevaluated(..) => bug!("should be evaluated"), + }; + let val = match val { + Value::ByRef(ptr, _align) => ptr.into_inner_primval(), + ref v => bug!("should be ByRef, was {:?}", v), + }; + let mem = match val { + PrimVal::Ptr(mem) => mem, + ref v => bug!("should be Ptr, was {:?}", v), + }; + assert_eq!(mem.offset, 0); + let alloc = tcx + .interpret_interner + .get_alloc(mem.alloc_id) + .expect("miri allocation never successfully created"); + (section.to_string(), alloc.bytes.clone()) +} diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index 337f85a381399..bb2aeca374882 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -72,6 +72,7 @@ pub use llvm_util::target_features; use std::any::Any; use std::path::PathBuf; use std::sync::mpsc; +use std::collections::BTreeMap; use rustc_data_structures::sync::Lrc; use rustc::dep_graph::DepGraph; @@ -98,6 +99,7 @@ mod back { pub mod symbol_export; pub mod write; mod rpath; + mod wasm; } mod abi; @@ -400,6 +402,7 @@ struct CrateInfo { used_crate_source: FxHashMap>, used_crates_static: Vec<(CrateNum, LibSource)>, used_crates_dynamic: Vec<(CrateNum, LibSource)>, + wasm_custom_sections: BTreeMap>, } __build_diagnostic_array! { librustc_trans, DIAGNOSTICS } diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index 69879bbe85d6e..f86fe1fb75643 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -1182,9 +1182,15 @@ pub fn check_item_type<'a,'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, it: &'tcx hir::Item let _indenter = indenter(); match it.node { // Consts can play a role in type-checking, so they are included here. - hir::ItemStatic(..) | + hir::ItemStatic(..) => { + tcx.typeck_tables_of(tcx.hir.local_def_id(it.id)); + } hir::ItemConst(..) => { tcx.typeck_tables_of(tcx.hir.local_def_id(it.id)); + if it.attrs.iter().any(|a| a.check_name("wasm_custom_section")) { + let def_id = tcx.hir.local_def_id(it.id); + check_const_is_u8_array(tcx, def_id, it.span); + } } hir::ItemEnum(ref enum_definition, _) => { check_enum(tcx, @@ -1256,6 +1262,21 @@ pub fn check_item_type<'a,'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, it: &'tcx hir::Item } } +fn check_const_is_u8_array<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, + def_id: DefId, + span: Span) { + match tcx.type_of(def_id).sty { + ty::TyArray(t, _) => { + match t.sty { + ty::TyUint(ast::UintTy::U8) => return, + _ => {} + } + } + _ => {} + } + tcx.sess.span_err(span, "must be an array of bytes like `[u8; N]`"); +} + fn check_on_unimplemented<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, trait_def_id: DefId, item: &hir::Item) { diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 915396d29fe26..dbcfee208ca2d 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -451,6 +451,9 @@ declare_features! ( // `use path as _;` and `extern crate c as _;` (active, underscore_imports, "1.26.0", Some(48216), None), + + // The #[wasm_custom_section] attribute + (active, wasm_custom_section, "1.26.0", None, None), ); declare_features! ( @@ -1004,6 +1007,11 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG "never will be stable", cfg_fn!(rustc_attrs))), + ("wasm_custom_section", Whitelisted, Gated(Stability::Unstable, + "wasm_custom_section", + "attribute is currently unstable", + cfg_fn!(wasm_custom_section))), + // Crate level attributes ("crate_name", CrateLevel, Ungated), ("crate_type", CrateLevel, Ungated), diff --git a/src/test/run-make/a-b-a-linker-guard/Makefile b/src/test/run-make-fulldeps/a-b-a-linker-guard/Makefile similarity index 100% rename from src/test/run-make/a-b-a-linker-guard/Makefile rename to src/test/run-make-fulldeps/a-b-a-linker-guard/Makefile diff --git a/src/test/run-make/a-b-a-linker-guard/a.rs b/src/test/run-make-fulldeps/a-b-a-linker-guard/a.rs similarity index 100% rename from src/test/run-make/a-b-a-linker-guard/a.rs rename to src/test/run-make-fulldeps/a-b-a-linker-guard/a.rs diff --git a/src/test/run-make/a-b-a-linker-guard/b.rs b/src/test/run-make-fulldeps/a-b-a-linker-guard/b.rs similarity index 100% rename from src/test/run-make/a-b-a-linker-guard/b.rs rename to src/test/run-make-fulldeps/a-b-a-linker-guard/b.rs diff --git a/src/test/run-make/alloc-extern-crates/Makefile b/src/test/run-make-fulldeps/alloc-extern-crates/Makefile similarity index 100% rename from src/test/run-make/alloc-extern-crates/Makefile rename to src/test/run-make-fulldeps/alloc-extern-crates/Makefile diff --git a/src/test/run-make/alloc-extern-crates/fakealloc.rs b/src/test/run-make-fulldeps/alloc-extern-crates/fakealloc.rs similarity index 100% rename from src/test/run-make/alloc-extern-crates/fakealloc.rs rename to src/test/run-make-fulldeps/alloc-extern-crates/fakealloc.rs diff --git a/src/test/run-make/allow-non-lint-warnings-cmdline/Makefile b/src/test/run-make-fulldeps/allow-non-lint-warnings-cmdline/Makefile similarity index 100% rename from src/test/run-make/allow-non-lint-warnings-cmdline/Makefile rename to src/test/run-make-fulldeps/allow-non-lint-warnings-cmdline/Makefile diff --git a/src/test/run-make/allow-non-lint-warnings-cmdline/foo.rs b/src/test/run-make-fulldeps/allow-non-lint-warnings-cmdline/foo.rs similarity index 100% rename from src/test/run-make/allow-non-lint-warnings-cmdline/foo.rs rename to src/test/run-make-fulldeps/allow-non-lint-warnings-cmdline/foo.rs diff --git a/src/test/run-make/allow-warnings-cmdline-stability/Makefile b/src/test/run-make-fulldeps/allow-warnings-cmdline-stability/Makefile similarity index 100% rename from src/test/run-make/allow-warnings-cmdline-stability/Makefile rename to src/test/run-make-fulldeps/allow-warnings-cmdline-stability/Makefile diff --git a/src/test/run-make/allow-warnings-cmdline-stability/bar.rs b/src/test/run-make-fulldeps/allow-warnings-cmdline-stability/bar.rs similarity index 100% rename from src/test/run-make/allow-warnings-cmdline-stability/bar.rs rename to src/test/run-make-fulldeps/allow-warnings-cmdline-stability/bar.rs diff --git a/src/test/run-make/allow-warnings-cmdline-stability/foo.rs b/src/test/run-make-fulldeps/allow-warnings-cmdline-stability/foo.rs similarity index 100% rename from src/test/run-make/allow-warnings-cmdline-stability/foo.rs rename to src/test/run-make-fulldeps/allow-warnings-cmdline-stability/foo.rs diff --git a/src/test/run-make/archive-duplicate-names/Makefile b/src/test/run-make-fulldeps/archive-duplicate-names/Makefile similarity index 100% rename from src/test/run-make/archive-duplicate-names/Makefile rename to src/test/run-make-fulldeps/archive-duplicate-names/Makefile diff --git a/src/test/run-make/archive-duplicate-names/bar.c b/src/test/run-make-fulldeps/archive-duplicate-names/bar.c similarity index 100% rename from src/test/run-make/archive-duplicate-names/bar.c rename to src/test/run-make-fulldeps/archive-duplicate-names/bar.c diff --git a/src/test/run-make/archive-duplicate-names/bar.rs b/src/test/run-make-fulldeps/archive-duplicate-names/bar.rs similarity index 100% rename from src/test/run-make/archive-duplicate-names/bar.rs rename to src/test/run-make-fulldeps/archive-duplicate-names/bar.rs diff --git a/src/test/run-make/archive-duplicate-names/foo.c b/src/test/run-make-fulldeps/archive-duplicate-names/foo.c similarity index 100% rename from src/test/run-make/archive-duplicate-names/foo.c rename to src/test/run-make-fulldeps/archive-duplicate-names/foo.c diff --git a/src/test/run-make/archive-duplicate-names/foo.rs b/src/test/run-make-fulldeps/archive-duplicate-names/foo.rs similarity index 100% rename from src/test/run-make/archive-duplicate-names/foo.rs rename to src/test/run-make-fulldeps/archive-duplicate-names/foo.rs diff --git a/src/test/run-make/atomic-lock-free/Makefile b/src/test/run-make-fulldeps/atomic-lock-free/Makefile similarity index 100% rename from src/test/run-make/atomic-lock-free/Makefile rename to src/test/run-make-fulldeps/atomic-lock-free/Makefile diff --git a/src/test/run-make/atomic-lock-free/atomic_lock_free.rs b/src/test/run-make-fulldeps/atomic-lock-free/atomic_lock_free.rs similarity index 100% rename from src/test/run-make/atomic-lock-free/atomic_lock_free.rs rename to src/test/run-make-fulldeps/atomic-lock-free/atomic_lock_free.rs diff --git a/src/test/run-make/bare-outfile/Makefile b/src/test/run-make-fulldeps/bare-outfile/Makefile similarity index 100% rename from src/test/run-make/bare-outfile/Makefile rename to src/test/run-make-fulldeps/bare-outfile/Makefile diff --git a/src/test/run-make/bare-outfile/foo.rs b/src/test/run-make-fulldeps/bare-outfile/foo.rs similarity index 100% rename from src/test/run-make/bare-outfile/foo.rs rename to src/test/run-make-fulldeps/bare-outfile/foo.rs diff --git a/src/test/run-make/c-dynamic-dylib/Makefile b/src/test/run-make-fulldeps/c-dynamic-dylib/Makefile similarity index 100% rename from src/test/run-make/c-dynamic-dylib/Makefile rename to src/test/run-make-fulldeps/c-dynamic-dylib/Makefile diff --git a/src/test/run-make/c-dynamic-dylib/bar.rs b/src/test/run-make-fulldeps/c-dynamic-dylib/bar.rs similarity index 100% rename from src/test/run-make/c-dynamic-dylib/bar.rs rename to src/test/run-make-fulldeps/c-dynamic-dylib/bar.rs diff --git a/src/test/run-make/c-dynamic-dylib/cfoo.c b/src/test/run-make-fulldeps/c-dynamic-dylib/cfoo.c similarity index 100% rename from src/test/run-make/c-dynamic-dylib/cfoo.c rename to src/test/run-make-fulldeps/c-dynamic-dylib/cfoo.c diff --git a/src/test/run-make/c-dynamic-dylib/foo.rs b/src/test/run-make-fulldeps/c-dynamic-dylib/foo.rs similarity index 100% rename from src/test/run-make/c-dynamic-dylib/foo.rs rename to src/test/run-make-fulldeps/c-dynamic-dylib/foo.rs diff --git a/src/test/run-make/c-dynamic-rlib/Makefile b/src/test/run-make-fulldeps/c-dynamic-rlib/Makefile similarity index 100% rename from src/test/run-make/c-dynamic-rlib/Makefile rename to src/test/run-make-fulldeps/c-dynamic-rlib/Makefile diff --git a/src/test/run-make/c-dynamic-rlib/bar.rs b/src/test/run-make-fulldeps/c-dynamic-rlib/bar.rs similarity index 100% rename from src/test/run-make/c-dynamic-rlib/bar.rs rename to src/test/run-make-fulldeps/c-dynamic-rlib/bar.rs diff --git a/src/test/run-make/c-dynamic-rlib/cfoo.c b/src/test/run-make-fulldeps/c-dynamic-rlib/cfoo.c similarity index 100% rename from src/test/run-make/c-dynamic-rlib/cfoo.c rename to src/test/run-make-fulldeps/c-dynamic-rlib/cfoo.c diff --git a/src/test/run-make/c-dynamic-rlib/foo.rs b/src/test/run-make-fulldeps/c-dynamic-rlib/foo.rs similarity index 100% rename from src/test/run-make/c-dynamic-rlib/foo.rs rename to src/test/run-make-fulldeps/c-dynamic-rlib/foo.rs diff --git a/src/test/run-make/c-link-to-rust-dylib/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-dylib/Makefile similarity index 100% rename from src/test/run-make/c-link-to-rust-dylib/Makefile rename to src/test/run-make-fulldeps/c-link-to-rust-dylib/Makefile diff --git a/src/test/run-make/c-link-to-rust-dylib/bar.c b/src/test/run-make-fulldeps/c-link-to-rust-dylib/bar.c similarity index 100% rename from src/test/run-make/c-link-to-rust-dylib/bar.c rename to src/test/run-make-fulldeps/c-link-to-rust-dylib/bar.c diff --git a/src/test/run-make/c-link-to-rust-dylib/foo.rs b/src/test/run-make-fulldeps/c-link-to-rust-dylib/foo.rs similarity index 100% rename from src/test/run-make/c-link-to-rust-dylib/foo.rs rename to src/test/run-make-fulldeps/c-link-to-rust-dylib/foo.rs diff --git a/src/test/run-make/c-link-to-rust-staticlib/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-staticlib/Makefile similarity index 100% rename from src/test/run-make/c-link-to-rust-staticlib/Makefile rename to src/test/run-make-fulldeps/c-link-to-rust-staticlib/Makefile diff --git a/src/test/run-make/c-link-to-rust-staticlib/bar.c b/src/test/run-make-fulldeps/c-link-to-rust-staticlib/bar.c similarity index 100% rename from src/test/run-make/c-link-to-rust-staticlib/bar.c rename to src/test/run-make-fulldeps/c-link-to-rust-staticlib/bar.c diff --git a/src/test/run-make/c-link-to-rust-staticlib/foo.rs b/src/test/run-make-fulldeps/c-link-to-rust-staticlib/foo.rs similarity index 100% rename from src/test/run-make/c-link-to-rust-staticlib/foo.rs rename to src/test/run-make-fulldeps/c-link-to-rust-staticlib/foo.rs diff --git a/src/test/run-make/c-static-dylib/Makefile b/src/test/run-make-fulldeps/c-static-dylib/Makefile similarity index 100% rename from src/test/run-make/c-static-dylib/Makefile rename to src/test/run-make-fulldeps/c-static-dylib/Makefile diff --git a/src/test/run-make/c-static-dylib/bar.rs b/src/test/run-make-fulldeps/c-static-dylib/bar.rs similarity index 100% rename from src/test/run-make/c-static-dylib/bar.rs rename to src/test/run-make-fulldeps/c-static-dylib/bar.rs diff --git a/src/test/run-make/c-static-dylib/cfoo.c b/src/test/run-make-fulldeps/c-static-dylib/cfoo.c similarity index 100% rename from src/test/run-make/c-static-dylib/cfoo.c rename to src/test/run-make-fulldeps/c-static-dylib/cfoo.c diff --git a/src/test/run-make/c-static-dylib/foo.rs b/src/test/run-make-fulldeps/c-static-dylib/foo.rs similarity index 100% rename from src/test/run-make/c-static-dylib/foo.rs rename to src/test/run-make-fulldeps/c-static-dylib/foo.rs diff --git a/src/test/run-make/c-static-rlib/Makefile b/src/test/run-make-fulldeps/c-static-rlib/Makefile similarity index 100% rename from src/test/run-make/c-static-rlib/Makefile rename to src/test/run-make-fulldeps/c-static-rlib/Makefile diff --git a/src/test/run-make/c-static-rlib/bar.rs b/src/test/run-make-fulldeps/c-static-rlib/bar.rs similarity index 100% rename from src/test/run-make/c-static-rlib/bar.rs rename to src/test/run-make-fulldeps/c-static-rlib/bar.rs diff --git a/src/test/run-make/c-static-rlib/cfoo.c b/src/test/run-make-fulldeps/c-static-rlib/cfoo.c similarity index 100% rename from src/test/run-make/c-static-rlib/cfoo.c rename to src/test/run-make-fulldeps/c-static-rlib/cfoo.c diff --git a/src/test/run-make/c-static-rlib/foo.rs b/src/test/run-make-fulldeps/c-static-rlib/foo.rs similarity index 100% rename from src/test/run-make/c-static-rlib/foo.rs rename to src/test/run-make-fulldeps/c-static-rlib/foo.rs diff --git a/src/test/run-make/cat-and-grep-sanity-check/Makefile b/src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile similarity index 100% rename from src/test/run-make/cat-and-grep-sanity-check/Makefile rename to src/test/run-make-fulldeps/cat-and-grep-sanity-check/Makefile diff --git a/src/test/run-make/cdylib-fewer-symbols/Makefile b/src/test/run-make-fulldeps/cdylib-fewer-symbols/Makefile similarity index 100% rename from src/test/run-make/cdylib-fewer-symbols/Makefile rename to src/test/run-make-fulldeps/cdylib-fewer-symbols/Makefile diff --git a/src/test/run-make/cdylib-fewer-symbols/foo.rs b/src/test/run-make-fulldeps/cdylib-fewer-symbols/foo.rs similarity index 100% rename from src/test/run-make/cdylib-fewer-symbols/foo.rs rename to src/test/run-make-fulldeps/cdylib-fewer-symbols/foo.rs diff --git a/src/test/run-make/cdylib/Makefile b/src/test/run-make-fulldeps/cdylib/Makefile similarity index 100% rename from src/test/run-make/cdylib/Makefile rename to src/test/run-make-fulldeps/cdylib/Makefile diff --git a/src/test/run-make/cdylib/bar.rs b/src/test/run-make-fulldeps/cdylib/bar.rs similarity index 100% rename from src/test/run-make/cdylib/bar.rs rename to src/test/run-make-fulldeps/cdylib/bar.rs diff --git a/src/test/run-make/cdylib/foo.c b/src/test/run-make-fulldeps/cdylib/foo.c similarity index 100% rename from src/test/run-make/cdylib/foo.c rename to src/test/run-make-fulldeps/cdylib/foo.c diff --git a/src/test/run-make/cdylib/foo.rs b/src/test/run-make-fulldeps/cdylib/foo.rs similarity index 100% rename from src/test/run-make/cdylib/foo.rs rename to src/test/run-make-fulldeps/cdylib/foo.rs diff --git a/src/test/run-make/codegen-options-parsing/Makefile b/src/test/run-make-fulldeps/codegen-options-parsing/Makefile similarity index 100% rename from src/test/run-make/codegen-options-parsing/Makefile rename to src/test/run-make-fulldeps/codegen-options-parsing/Makefile diff --git a/src/test/run-make/codegen-options-parsing/dummy.rs b/src/test/run-make-fulldeps/codegen-options-parsing/dummy.rs similarity index 100% rename from src/test/run-make/codegen-options-parsing/dummy.rs rename to src/test/run-make-fulldeps/codegen-options-parsing/dummy.rs diff --git a/src/test/run-make/compile-stdin/Makefile b/src/test/run-make-fulldeps/compile-stdin/Makefile similarity index 100% rename from src/test/run-make/compile-stdin/Makefile rename to src/test/run-make-fulldeps/compile-stdin/Makefile diff --git a/src/test/run-make/compiler-lookup-paths-2/Makefile b/src/test/run-make-fulldeps/compiler-lookup-paths-2/Makefile similarity index 100% rename from src/test/run-make/compiler-lookup-paths-2/Makefile rename to src/test/run-make-fulldeps/compiler-lookup-paths-2/Makefile diff --git a/src/test/run-make/compiler-lookup-paths-2/a.rs b/src/test/run-make-fulldeps/compiler-lookup-paths-2/a.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths-2/a.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths-2/a.rs diff --git a/src/test/run-make/compiler-lookup-paths-2/b.rs b/src/test/run-make-fulldeps/compiler-lookup-paths-2/b.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths-2/b.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths-2/b.rs diff --git a/src/test/run-make/compiler-lookup-paths-2/c.rs b/src/test/run-make-fulldeps/compiler-lookup-paths-2/c.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths-2/c.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths-2/c.rs diff --git a/src/test/run-make/compiler-lookup-paths/Makefile b/src/test/run-make-fulldeps/compiler-lookup-paths/Makefile similarity index 100% rename from src/test/run-make/compiler-lookup-paths/Makefile rename to src/test/run-make-fulldeps/compiler-lookup-paths/Makefile diff --git a/src/test/run-make/compiler-lookup-paths/a.rs b/src/test/run-make-fulldeps/compiler-lookup-paths/a.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths/a.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths/a.rs diff --git a/src/test/run-make/compiler-lookup-paths/b.rs b/src/test/run-make-fulldeps/compiler-lookup-paths/b.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths/b.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths/b.rs diff --git a/src/test/run-make/compiler-lookup-paths/c.rs b/src/test/run-make-fulldeps/compiler-lookup-paths/c.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths/c.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths/c.rs diff --git a/src/test/run-make/compiler-lookup-paths/d.rs b/src/test/run-make-fulldeps/compiler-lookup-paths/d.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths/d.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths/d.rs diff --git a/src/test/run-make/compiler-lookup-paths/e.rs b/src/test/run-make-fulldeps/compiler-lookup-paths/e.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths/e.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths/e.rs diff --git a/src/test/run-make/compiler-lookup-paths/e2.rs b/src/test/run-make-fulldeps/compiler-lookup-paths/e2.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths/e2.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths/e2.rs diff --git a/src/test/run-make/compiler-lookup-paths/f.rs b/src/test/run-make-fulldeps/compiler-lookup-paths/f.rs similarity index 100% rename from src/test/run-make/compiler-lookup-paths/f.rs rename to src/test/run-make-fulldeps/compiler-lookup-paths/f.rs diff --git a/src/test/run-make/compiler-lookup-paths/native.c b/src/test/run-make-fulldeps/compiler-lookup-paths/native.c similarity index 100% rename from src/test/run-make/compiler-lookup-paths/native.c rename to src/test/run-make-fulldeps/compiler-lookup-paths/native.c diff --git a/src/test/run-make/compiler-rt-works-on-mingw/Makefile b/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile similarity index 100% rename from src/test/run-make/compiler-rt-works-on-mingw/Makefile rename to src/test/run-make-fulldeps/compiler-rt-works-on-mingw/Makefile diff --git a/src/test/run-make/compiler-rt-works-on-mingw/foo.cpp b/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp similarity index 100% rename from src/test/run-make/compiler-rt-works-on-mingw/foo.cpp rename to src/test/run-make-fulldeps/compiler-rt-works-on-mingw/foo.cpp diff --git a/src/test/run-make/compiler-rt-works-on-mingw/foo.rs b/src/test/run-make-fulldeps/compiler-rt-works-on-mingw/foo.rs similarity index 100% rename from src/test/run-make/compiler-rt-works-on-mingw/foo.rs rename to src/test/run-make-fulldeps/compiler-rt-works-on-mingw/foo.rs diff --git a/src/test/run-make/crate-data-smoke/Makefile b/src/test/run-make-fulldeps/crate-data-smoke/Makefile similarity index 100% rename from src/test/run-make/crate-data-smoke/Makefile rename to src/test/run-make-fulldeps/crate-data-smoke/Makefile diff --git a/src/test/run-make/crate-data-smoke/crate.rs b/src/test/run-make-fulldeps/crate-data-smoke/crate.rs similarity index 100% rename from src/test/run-make/crate-data-smoke/crate.rs rename to src/test/run-make-fulldeps/crate-data-smoke/crate.rs diff --git a/src/test/run-make/crate-data-smoke/lib.rs b/src/test/run-make-fulldeps/crate-data-smoke/lib.rs similarity index 100% rename from src/test/run-make/crate-data-smoke/lib.rs rename to src/test/run-make-fulldeps/crate-data-smoke/lib.rs diff --git a/src/test/run-make/crate-data-smoke/rlib.rs b/src/test/run-make-fulldeps/crate-data-smoke/rlib.rs similarity index 100% rename from src/test/run-make/crate-data-smoke/rlib.rs rename to src/test/run-make-fulldeps/crate-data-smoke/rlib.rs diff --git a/src/test/run-make/crate-name-priority/Makefile b/src/test/run-make-fulldeps/crate-name-priority/Makefile similarity index 100% rename from src/test/run-make/crate-name-priority/Makefile rename to src/test/run-make-fulldeps/crate-name-priority/Makefile diff --git a/src/test/run-make/crate-name-priority/foo.rs b/src/test/run-make-fulldeps/crate-name-priority/foo.rs similarity index 100% rename from src/test/run-make/crate-name-priority/foo.rs rename to src/test/run-make-fulldeps/crate-name-priority/foo.rs diff --git a/src/test/run-make/crate-name-priority/foo1.rs b/src/test/run-make-fulldeps/crate-name-priority/foo1.rs similarity index 100% rename from src/test/run-make/crate-name-priority/foo1.rs rename to src/test/run-make-fulldeps/crate-name-priority/foo1.rs diff --git a/src/test/run-make/debug-assertions/Makefile b/src/test/run-make-fulldeps/debug-assertions/Makefile similarity index 100% rename from src/test/run-make/debug-assertions/Makefile rename to src/test/run-make-fulldeps/debug-assertions/Makefile diff --git a/src/test/run-make/debug-assertions/debug.rs b/src/test/run-make-fulldeps/debug-assertions/debug.rs similarity index 100% rename from src/test/run-make/debug-assertions/debug.rs rename to src/test/run-make-fulldeps/debug-assertions/debug.rs diff --git a/src/test/run-make/dep-info-doesnt-run-much/Makefile b/src/test/run-make-fulldeps/dep-info-doesnt-run-much/Makefile similarity index 100% rename from src/test/run-make/dep-info-doesnt-run-much/Makefile rename to src/test/run-make-fulldeps/dep-info-doesnt-run-much/Makefile diff --git a/src/test/run-make/dep-info-doesnt-run-much/foo.rs b/src/test/run-make-fulldeps/dep-info-doesnt-run-much/foo.rs similarity index 100% rename from src/test/run-make/dep-info-doesnt-run-much/foo.rs rename to src/test/run-make-fulldeps/dep-info-doesnt-run-much/foo.rs diff --git a/src/test/run-make/dep-info-spaces/Makefile b/src/test/run-make-fulldeps/dep-info-spaces/Makefile similarity index 100% rename from src/test/run-make/dep-info-spaces/Makefile rename to src/test/run-make-fulldeps/dep-info-spaces/Makefile diff --git a/src/test/run-make/dep-info-spaces/Makefile.foo b/src/test/run-make-fulldeps/dep-info-spaces/Makefile.foo similarity index 100% rename from src/test/run-make/dep-info-spaces/Makefile.foo rename to src/test/run-make-fulldeps/dep-info-spaces/Makefile.foo diff --git a/src/test/run-make/dep-info-spaces/bar.rs b/src/test/run-make-fulldeps/dep-info-spaces/bar.rs similarity index 100% rename from src/test/run-make/dep-info-spaces/bar.rs rename to src/test/run-make-fulldeps/dep-info-spaces/bar.rs diff --git a/src/test/run-make/dep-info-spaces/foo foo.rs b/src/test/run-make-fulldeps/dep-info-spaces/foo foo.rs similarity index 100% rename from src/test/run-make/dep-info-spaces/foo foo.rs rename to src/test/run-make-fulldeps/dep-info-spaces/foo foo.rs diff --git a/src/test/run-make/dep-info-spaces/lib.rs b/src/test/run-make-fulldeps/dep-info-spaces/lib.rs similarity index 100% rename from src/test/run-make/dep-info-spaces/lib.rs rename to src/test/run-make-fulldeps/dep-info-spaces/lib.rs diff --git a/src/test/run-make/dep-info/Makefile b/src/test/run-make-fulldeps/dep-info/Makefile similarity index 100% rename from src/test/run-make/dep-info/Makefile rename to src/test/run-make-fulldeps/dep-info/Makefile diff --git a/src/test/run-make/dep-info/Makefile.foo b/src/test/run-make-fulldeps/dep-info/Makefile.foo similarity index 100% rename from src/test/run-make/dep-info/Makefile.foo rename to src/test/run-make-fulldeps/dep-info/Makefile.foo diff --git a/src/test/run-make/dep-info/bar.rs b/src/test/run-make-fulldeps/dep-info/bar.rs similarity index 100% rename from src/test/run-make/dep-info/bar.rs rename to src/test/run-make-fulldeps/dep-info/bar.rs diff --git a/src/test/run-make/dep-info/foo.rs b/src/test/run-make-fulldeps/dep-info/foo.rs similarity index 100% rename from src/test/run-make/dep-info/foo.rs rename to src/test/run-make-fulldeps/dep-info/foo.rs diff --git a/src/test/run-make/dep-info/lib.rs b/src/test/run-make-fulldeps/dep-info/lib.rs similarity index 100% rename from src/test/run-make/dep-info/lib.rs rename to src/test/run-make-fulldeps/dep-info/lib.rs diff --git a/src/test/run-make/dep-info/lib2.rs b/src/test/run-make-fulldeps/dep-info/lib2.rs similarity index 100% rename from src/test/run-make/dep-info/lib2.rs rename to src/test/run-make-fulldeps/dep-info/lib2.rs diff --git a/src/test/run-make/duplicate-output-flavors/Makefile b/src/test/run-make-fulldeps/duplicate-output-flavors/Makefile similarity index 100% rename from src/test/run-make/duplicate-output-flavors/Makefile rename to src/test/run-make-fulldeps/duplicate-output-flavors/Makefile diff --git a/src/test/run-make/duplicate-output-flavors/foo.rs b/src/test/run-make-fulldeps/duplicate-output-flavors/foo.rs similarity index 100% rename from src/test/run-make/duplicate-output-flavors/foo.rs rename to src/test/run-make-fulldeps/duplicate-output-flavors/foo.rs diff --git a/src/test/run-make/dylib-chain/Makefile b/src/test/run-make-fulldeps/dylib-chain/Makefile similarity index 100% rename from src/test/run-make/dylib-chain/Makefile rename to src/test/run-make-fulldeps/dylib-chain/Makefile diff --git a/src/test/run-make/dylib-chain/m1.rs b/src/test/run-make-fulldeps/dylib-chain/m1.rs similarity index 100% rename from src/test/run-make/dylib-chain/m1.rs rename to src/test/run-make-fulldeps/dylib-chain/m1.rs diff --git a/src/test/run-make/dylib-chain/m2.rs b/src/test/run-make-fulldeps/dylib-chain/m2.rs similarity index 100% rename from src/test/run-make/dylib-chain/m2.rs rename to src/test/run-make-fulldeps/dylib-chain/m2.rs diff --git a/src/test/run-make/dylib-chain/m3.rs b/src/test/run-make-fulldeps/dylib-chain/m3.rs similarity index 100% rename from src/test/run-make/dylib-chain/m3.rs rename to src/test/run-make-fulldeps/dylib-chain/m3.rs diff --git a/src/test/run-make/dylib-chain/m4.rs b/src/test/run-make-fulldeps/dylib-chain/m4.rs similarity index 100% rename from src/test/run-make/dylib-chain/m4.rs rename to src/test/run-make-fulldeps/dylib-chain/m4.rs diff --git a/src/test/run-make/emit/Makefile b/src/test/run-make-fulldeps/emit/Makefile similarity index 100% rename from src/test/run-make/emit/Makefile rename to src/test/run-make-fulldeps/emit/Makefile diff --git a/src/test/run-make/emit/test-24876.rs b/src/test/run-make-fulldeps/emit/test-24876.rs similarity index 100% rename from src/test/run-make/emit/test-24876.rs rename to src/test/run-make-fulldeps/emit/test-24876.rs diff --git a/src/test/run-make/emit/test-26235.rs b/src/test/run-make-fulldeps/emit/test-26235.rs similarity index 100% rename from src/test/run-make/emit/test-26235.rs rename to src/test/run-make-fulldeps/emit/test-26235.rs diff --git a/src/test/run-make/error-found-staticlib-instead-crate/Makefile b/src/test/run-make-fulldeps/error-found-staticlib-instead-crate/Makefile similarity index 100% rename from src/test/run-make/error-found-staticlib-instead-crate/Makefile rename to src/test/run-make-fulldeps/error-found-staticlib-instead-crate/Makefile diff --git a/src/test/run-make/error-found-staticlib-instead-crate/bar.rs b/src/test/run-make-fulldeps/error-found-staticlib-instead-crate/bar.rs similarity index 100% rename from src/test/run-make/error-found-staticlib-instead-crate/bar.rs rename to src/test/run-make-fulldeps/error-found-staticlib-instead-crate/bar.rs diff --git a/src/test/run-make/error-found-staticlib-instead-crate/foo.rs b/src/test/run-make-fulldeps/error-found-staticlib-instead-crate/foo.rs similarity index 100% rename from src/test/run-make/error-found-staticlib-instead-crate/foo.rs rename to src/test/run-make-fulldeps/error-found-staticlib-instead-crate/foo.rs diff --git a/src/test/run-make/error-writing-dependencies/Makefile b/src/test/run-make-fulldeps/error-writing-dependencies/Makefile similarity index 100% rename from src/test/run-make/error-writing-dependencies/Makefile rename to src/test/run-make-fulldeps/error-writing-dependencies/Makefile diff --git a/src/test/run-make/error-writing-dependencies/foo.rs b/src/test/run-make-fulldeps/error-writing-dependencies/foo.rs similarity index 100% rename from src/test/run-make/error-writing-dependencies/foo.rs rename to src/test/run-make-fulldeps/error-writing-dependencies/foo.rs diff --git a/src/test/run-make/extern-diff-internal-name/Makefile b/src/test/run-make-fulldeps/extern-diff-internal-name/Makefile similarity index 100% rename from src/test/run-make/extern-diff-internal-name/Makefile rename to src/test/run-make-fulldeps/extern-diff-internal-name/Makefile diff --git a/src/test/run-make/extern-diff-internal-name/lib.rs b/src/test/run-make-fulldeps/extern-diff-internal-name/lib.rs similarity index 100% rename from src/test/run-make/extern-diff-internal-name/lib.rs rename to src/test/run-make-fulldeps/extern-diff-internal-name/lib.rs diff --git a/src/test/run-make/extern-diff-internal-name/test.rs b/src/test/run-make-fulldeps/extern-diff-internal-name/test.rs similarity index 100% rename from src/test/run-make/extern-diff-internal-name/test.rs rename to src/test/run-make-fulldeps/extern-diff-internal-name/test.rs diff --git a/src/test/run-make/extern-flag-disambiguates/Makefile b/src/test/run-make-fulldeps/extern-flag-disambiguates/Makefile similarity index 100% rename from src/test/run-make/extern-flag-disambiguates/Makefile rename to src/test/run-make-fulldeps/extern-flag-disambiguates/Makefile diff --git a/src/test/run-make/extern-flag-disambiguates/a.rs b/src/test/run-make-fulldeps/extern-flag-disambiguates/a.rs similarity index 100% rename from src/test/run-make/extern-flag-disambiguates/a.rs rename to src/test/run-make-fulldeps/extern-flag-disambiguates/a.rs diff --git a/src/test/run-make/extern-flag-disambiguates/b.rs b/src/test/run-make-fulldeps/extern-flag-disambiguates/b.rs similarity index 100% rename from src/test/run-make/extern-flag-disambiguates/b.rs rename to src/test/run-make-fulldeps/extern-flag-disambiguates/b.rs diff --git a/src/test/run-make/extern-flag-disambiguates/c.rs b/src/test/run-make-fulldeps/extern-flag-disambiguates/c.rs similarity index 100% rename from src/test/run-make/extern-flag-disambiguates/c.rs rename to src/test/run-make-fulldeps/extern-flag-disambiguates/c.rs diff --git a/src/test/run-make/extern-flag-disambiguates/d.rs b/src/test/run-make-fulldeps/extern-flag-disambiguates/d.rs similarity index 100% rename from src/test/run-make/extern-flag-disambiguates/d.rs rename to src/test/run-make-fulldeps/extern-flag-disambiguates/d.rs diff --git a/src/test/run-make/extern-flag-fun/Makefile b/src/test/run-make-fulldeps/extern-flag-fun/Makefile similarity index 100% rename from src/test/run-make/extern-flag-fun/Makefile rename to src/test/run-make-fulldeps/extern-flag-fun/Makefile diff --git a/src/test/run-make/extern-flag-fun/bar-alt.rs b/src/test/run-make-fulldeps/extern-flag-fun/bar-alt.rs similarity index 100% rename from src/test/run-make/extern-flag-fun/bar-alt.rs rename to src/test/run-make-fulldeps/extern-flag-fun/bar-alt.rs diff --git a/src/test/run-make/extern-flag-fun/bar.rs b/src/test/run-make-fulldeps/extern-flag-fun/bar.rs similarity index 100% rename from src/test/run-make/extern-flag-fun/bar.rs rename to src/test/run-make-fulldeps/extern-flag-fun/bar.rs diff --git a/src/test/run-make/extern-flag-fun/foo.rs b/src/test/run-make-fulldeps/extern-flag-fun/foo.rs similarity index 100% rename from src/test/run-make/extern-flag-fun/foo.rs rename to src/test/run-make-fulldeps/extern-flag-fun/foo.rs diff --git a/src/test/run-make/extern-fn-generic/Makefile b/src/test/run-make-fulldeps/extern-fn-generic/Makefile similarity index 100% rename from src/test/run-make/extern-fn-generic/Makefile rename to src/test/run-make-fulldeps/extern-fn-generic/Makefile diff --git a/src/test/run-make/extern-fn-generic/test.c b/src/test/run-make-fulldeps/extern-fn-generic/test.c similarity index 100% rename from src/test/run-make/extern-fn-generic/test.c rename to src/test/run-make-fulldeps/extern-fn-generic/test.c diff --git a/src/test/run-make/extern-fn-generic/test.rs b/src/test/run-make-fulldeps/extern-fn-generic/test.rs similarity index 100% rename from src/test/run-make/extern-fn-generic/test.rs rename to src/test/run-make-fulldeps/extern-fn-generic/test.rs diff --git a/src/test/run-make/extern-fn-generic/testcrate.rs b/src/test/run-make-fulldeps/extern-fn-generic/testcrate.rs similarity index 100% rename from src/test/run-make/extern-fn-generic/testcrate.rs rename to src/test/run-make-fulldeps/extern-fn-generic/testcrate.rs diff --git a/src/test/run-make/extern-fn-mangle/Makefile b/src/test/run-make-fulldeps/extern-fn-mangle/Makefile similarity index 100% rename from src/test/run-make/extern-fn-mangle/Makefile rename to src/test/run-make-fulldeps/extern-fn-mangle/Makefile diff --git a/src/test/run-make/extern-fn-mangle/test.c b/src/test/run-make-fulldeps/extern-fn-mangle/test.c similarity index 100% rename from src/test/run-make/extern-fn-mangle/test.c rename to src/test/run-make-fulldeps/extern-fn-mangle/test.c diff --git a/src/test/run-make/extern-fn-mangle/test.rs b/src/test/run-make-fulldeps/extern-fn-mangle/test.rs similarity index 100% rename from src/test/run-make/extern-fn-mangle/test.rs rename to src/test/run-make-fulldeps/extern-fn-mangle/test.rs diff --git a/src/test/run-make/extern-fn-reachable/Makefile b/src/test/run-make-fulldeps/extern-fn-reachable/Makefile similarity index 100% rename from src/test/run-make/extern-fn-reachable/Makefile rename to src/test/run-make-fulldeps/extern-fn-reachable/Makefile diff --git a/src/test/run-make/extern-fn-reachable/dylib.rs b/src/test/run-make-fulldeps/extern-fn-reachable/dylib.rs similarity index 100% rename from src/test/run-make/extern-fn-reachable/dylib.rs rename to src/test/run-make-fulldeps/extern-fn-reachable/dylib.rs diff --git a/src/test/run-make/extern-fn-reachable/main.rs b/src/test/run-make-fulldeps/extern-fn-reachable/main.rs similarity index 100% rename from src/test/run-make/extern-fn-reachable/main.rs rename to src/test/run-make-fulldeps/extern-fn-reachable/main.rs diff --git a/src/test/run-make/extern-fn-struct-passing-abi/Makefile b/src/test/run-make-fulldeps/extern-fn-struct-passing-abi/Makefile similarity index 100% rename from src/test/run-make/extern-fn-struct-passing-abi/Makefile rename to src/test/run-make-fulldeps/extern-fn-struct-passing-abi/Makefile diff --git a/src/test/run-make/extern-fn-struct-passing-abi/test.c b/src/test/run-make-fulldeps/extern-fn-struct-passing-abi/test.c similarity index 100% rename from src/test/run-make/extern-fn-struct-passing-abi/test.c rename to src/test/run-make-fulldeps/extern-fn-struct-passing-abi/test.c diff --git a/src/test/run-make/extern-fn-struct-passing-abi/test.rs b/src/test/run-make-fulldeps/extern-fn-struct-passing-abi/test.rs similarity index 100% rename from src/test/run-make/extern-fn-struct-passing-abi/test.rs rename to src/test/run-make-fulldeps/extern-fn-struct-passing-abi/test.rs diff --git a/src/test/run-make/extern-fn-with-extern-types/Makefile b/src/test/run-make-fulldeps/extern-fn-with-extern-types/Makefile similarity index 100% rename from src/test/run-make/extern-fn-with-extern-types/Makefile rename to src/test/run-make-fulldeps/extern-fn-with-extern-types/Makefile diff --git a/src/test/run-make/extern-fn-with-extern-types/ctest.c b/src/test/run-make-fulldeps/extern-fn-with-extern-types/ctest.c similarity index 100% rename from src/test/run-make/extern-fn-with-extern-types/ctest.c rename to src/test/run-make-fulldeps/extern-fn-with-extern-types/ctest.c diff --git a/src/test/run-make/extern-fn-with-extern-types/test.rs b/src/test/run-make-fulldeps/extern-fn-with-extern-types/test.rs similarity index 100% rename from src/test/run-make/extern-fn-with-extern-types/test.rs rename to src/test/run-make-fulldeps/extern-fn-with-extern-types/test.rs diff --git a/src/test/run-make/extern-fn-with-packed-struct/Makefile b/src/test/run-make-fulldeps/extern-fn-with-packed-struct/Makefile similarity index 100% rename from src/test/run-make/extern-fn-with-packed-struct/Makefile rename to src/test/run-make-fulldeps/extern-fn-with-packed-struct/Makefile diff --git a/src/test/run-make/extern-fn-with-packed-struct/test.c b/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c similarity index 100% rename from src/test/run-make/extern-fn-with-packed-struct/test.c rename to src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.c diff --git a/src/test/run-make/extern-fn-with-packed-struct/test.rs b/src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.rs similarity index 100% rename from src/test/run-make/extern-fn-with-packed-struct/test.rs rename to src/test/run-make-fulldeps/extern-fn-with-packed-struct/test.rs diff --git a/src/test/run-make/extern-fn-with-union/Makefile b/src/test/run-make-fulldeps/extern-fn-with-union/Makefile similarity index 100% rename from src/test/run-make/extern-fn-with-union/Makefile rename to src/test/run-make-fulldeps/extern-fn-with-union/Makefile diff --git a/src/test/run-make/extern-fn-with-union/ctest.c b/src/test/run-make-fulldeps/extern-fn-with-union/ctest.c similarity index 100% rename from src/test/run-make/extern-fn-with-union/ctest.c rename to src/test/run-make-fulldeps/extern-fn-with-union/ctest.c diff --git a/src/test/run-make/extern-fn-with-union/test.rs b/src/test/run-make-fulldeps/extern-fn-with-union/test.rs similarity index 100% rename from src/test/run-make/extern-fn-with-union/test.rs rename to src/test/run-make-fulldeps/extern-fn-with-union/test.rs diff --git a/src/test/run-make/extern-fn-with-union/testcrate.rs b/src/test/run-make-fulldeps/extern-fn-with-union/testcrate.rs similarity index 100% rename from src/test/run-make/extern-fn-with-union/testcrate.rs rename to src/test/run-make-fulldeps/extern-fn-with-union/testcrate.rs diff --git a/src/test/run-make/extern-multiple-copies/Makefile b/src/test/run-make-fulldeps/extern-multiple-copies/Makefile similarity index 100% rename from src/test/run-make/extern-multiple-copies/Makefile rename to src/test/run-make-fulldeps/extern-multiple-copies/Makefile diff --git a/src/test/run-make/extern-multiple-copies/bar.rs b/src/test/run-make-fulldeps/extern-multiple-copies/bar.rs similarity index 100% rename from src/test/run-make/extern-multiple-copies/bar.rs rename to src/test/run-make-fulldeps/extern-multiple-copies/bar.rs diff --git a/src/test/run-make/extern-multiple-copies/foo1.rs b/src/test/run-make-fulldeps/extern-multiple-copies/foo1.rs similarity index 100% rename from src/test/run-make/extern-multiple-copies/foo1.rs rename to src/test/run-make-fulldeps/extern-multiple-copies/foo1.rs diff --git a/src/test/run-make/extern-multiple-copies/foo2.rs b/src/test/run-make-fulldeps/extern-multiple-copies/foo2.rs similarity index 100% rename from src/test/run-make/extern-multiple-copies/foo2.rs rename to src/test/run-make-fulldeps/extern-multiple-copies/foo2.rs diff --git a/src/test/run-make/extern-multiple-copies2/Makefile b/src/test/run-make-fulldeps/extern-multiple-copies2/Makefile similarity index 100% rename from src/test/run-make/extern-multiple-copies2/Makefile rename to src/test/run-make-fulldeps/extern-multiple-copies2/Makefile diff --git a/src/test/run-make/extern-multiple-copies2/bar.rs b/src/test/run-make-fulldeps/extern-multiple-copies2/bar.rs similarity index 100% rename from src/test/run-make/extern-multiple-copies2/bar.rs rename to src/test/run-make-fulldeps/extern-multiple-copies2/bar.rs diff --git a/src/test/run-make/extern-multiple-copies2/foo1.rs b/src/test/run-make-fulldeps/extern-multiple-copies2/foo1.rs similarity index 100% rename from src/test/run-make/extern-multiple-copies2/foo1.rs rename to src/test/run-make-fulldeps/extern-multiple-copies2/foo1.rs diff --git a/src/test/run-make/extern-multiple-copies2/foo2.rs b/src/test/run-make-fulldeps/extern-multiple-copies2/foo2.rs similarity index 100% rename from src/test/run-make/extern-multiple-copies2/foo2.rs rename to src/test/run-make-fulldeps/extern-multiple-copies2/foo2.rs diff --git a/src/test/run-make/extern-overrides-distribution/Makefile b/src/test/run-make-fulldeps/extern-overrides-distribution/Makefile similarity index 100% rename from src/test/run-make/extern-overrides-distribution/Makefile rename to src/test/run-make-fulldeps/extern-overrides-distribution/Makefile diff --git a/src/test/run-make/extern-overrides-distribution/libc.rs b/src/test/run-make-fulldeps/extern-overrides-distribution/libc.rs similarity index 100% rename from src/test/run-make/extern-overrides-distribution/libc.rs rename to src/test/run-make-fulldeps/extern-overrides-distribution/libc.rs diff --git a/src/test/run-make/extern-overrides-distribution/main.rs b/src/test/run-make-fulldeps/extern-overrides-distribution/main.rs similarity index 100% rename from src/test/run-make/extern-overrides-distribution/main.rs rename to src/test/run-make-fulldeps/extern-overrides-distribution/main.rs diff --git a/src/test/run-make/extra-filename-with-temp-outputs/Makefile b/src/test/run-make-fulldeps/extra-filename-with-temp-outputs/Makefile similarity index 100% rename from src/test/run-make/extra-filename-with-temp-outputs/Makefile rename to src/test/run-make-fulldeps/extra-filename-with-temp-outputs/Makefile diff --git a/src/test/run-make/extra-filename-with-temp-outputs/foo.rs b/src/test/run-make-fulldeps/extra-filename-with-temp-outputs/foo.rs similarity index 100% rename from src/test/run-make/extra-filename-with-temp-outputs/foo.rs rename to src/test/run-make-fulldeps/extra-filename-with-temp-outputs/foo.rs diff --git a/src/test/run-make/fpic/Makefile b/src/test/run-make-fulldeps/fpic/Makefile similarity index 100% rename from src/test/run-make/fpic/Makefile rename to src/test/run-make-fulldeps/fpic/Makefile diff --git a/src/test/run-make/fpic/hello.rs b/src/test/run-make-fulldeps/fpic/hello.rs similarity index 100% rename from src/test/run-make/fpic/hello.rs rename to src/test/run-make-fulldeps/fpic/hello.rs diff --git a/src/test/run-make/hir-tree/Makefile b/src/test/run-make-fulldeps/hir-tree/Makefile similarity index 100% rename from src/test/run-make/hir-tree/Makefile rename to src/test/run-make-fulldeps/hir-tree/Makefile diff --git a/src/test/run-make/hir-tree/input.rs b/src/test/run-make-fulldeps/hir-tree/input.rs similarity index 100% rename from src/test/run-make/hir-tree/input.rs rename to src/test/run-make-fulldeps/hir-tree/input.rs diff --git a/src/test/run-make/hotplug_codegen_backend/Makefile b/src/test/run-make-fulldeps/hotplug_codegen_backend/Makefile similarity index 100% rename from src/test/run-make/hotplug_codegen_backend/Makefile rename to src/test/run-make-fulldeps/hotplug_codegen_backend/Makefile diff --git a/src/test/run-make/hotplug_codegen_backend/some_crate.rs b/src/test/run-make-fulldeps/hotplug_codegen_backend/some_crate.rs similarity index 100% rename from src/test/run-make/hotplug_codegen_backend/some_crate.rs rename to src/test/run-make-fulldeps/hotplug_codegen_backend/some_crate.rs diff --git a/src/test/run-make/hotplug_codegen_backend/the_backend.rs b/src/test/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs similarity index 100% rename from src/test/run-make/hotplug_codegen_backend/the_backend.rs rename to src/test/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs diff --git a/src/test/run-make/include_bytes_deps/Makefile b/src/test/run-make-fulldeps/include_bytes_deps/Makefile similarity index 100% rename from src/test/run-make/include_bytes_deps/Makefile rename to src/test/run-make-fulldeps/include_bytes_deps/Makefile diff --git a/src/test/run-make/include_bytes_deps/input.bin b/src/test/run-make-fulldeps/include_bytes_deps/input.bin similarity index 100% rename from src/test/run-make/include_bytes_deps/input.bin rename to src/test/run-make-fulldeps/include_bytes_deps/input.bin diff --git a/src/test/run-make/include_bytes_deps/input.md b/src/test/run-make-fulldeps/include_bytes_deps/input.md similarity index 100% rename from src/test/run-make/include_bytes_deps/input.md rename to src/test/run-make-fulldeps/include_bytes_deps/input.md diff --git a/src/test/run-make/include_bytes_deps/input.txt b/src/test/run-make-fulldeps/include_bytes_deps/input.txt similarity index 100% rename from src/test/run-make/include_bytes_deps/input.txt rename to src/test/run-make-fulldeps/include_bytes_deps/input.txt diff --git a/src/test/run-make/include_bytes_deps/main.rs b/src/test/run-make-fulldeps/include_bytes_deps/main.rs similarity index 100% rename from src/test/run-make/include_bytes_deps/main.rs rename to src/test/run-make-fulldeps/include_bytes_deps/main.rs diff --git a/src/test/run-make/inline-always-many-cgu/Makefile b/src/test/run-make-fulldeps/inline-always-many-cgu/Makefile similarity index 100% rename from src/test/run-make/inline-always-many-cgu/Makefile rename to src/test/run-make-fulldeps/inline-always-many-cgu/Makefile diff --git a/src/test/run-make/inline-always-many-cgu/foo.rs b/src/test/run-make-fulldeps/inline-always-many-cgu/foo.rs similarity index 100% rename from src/test/run-make/inline-always-many-cgu/foo.rs rename to src/test/run-make-fulldeps/inline-always-many-cgu/foo.rs diff --git a/src/test/run-make/interdependent-c-libraries/Makefile b/src/test/run-make-fulldeps/interdependent-c-libraries/Makefile similarity index 100% rename from src/test/run-make/interdependent-c-libraries/Makefile rename to src/test/run-make-fulldeps/interdependent-c-libraries/Makefile diff --git a/src/test/run-make/interdependent-c-libraries/bar.c b/src/test/run-make-fulldeps/interdependent-c-libraries/bar.c similarity index 100% rename from src/test/run-make/interdependent-c-libraries/bar.c rename to src/test/run-make-fulldeps/interdependent-c-libraries/bar.c diff --git a/src/test/run-make/interdependent-c-libraries/bar.rs b/src/test/run-make-fulldeps/interdependent-c-libraries/bar.rs similarity index 100% rename from src/test/run-make/interdependent-c-libraries/bar.rs rename to src/test/run-make-fulldeps/interdependent-c-libraries/bar.rs diff --git a/src/test/run-make/interdependent-c-libraries/foo.c b/src/test/run-make-fulldeps/interdependent-c-libraries/foo.c similarity index 100% rename from src/test/run-make/interdependent-c-libraries/foo.c rename to src/test/run-make-fulldeps/interdependent-c-libraries/foo.c diff --git a/src/test/run-make/interdependent-c-libraries/foo.rs b/src/test/run-make-fulldeps/interdependent-c-libraries/foo.rs similarity index 100% rename from src/test/run-make/interdependent-c-libraries/foo.rs rename to src/test/run-make-fulldeps/interdependent-c-libraries/foo.rs diff --git a/src/test/run-make/interdependent-c-libraries/main.rs b/src/test/run-make-fulldeps/interdependent-c-libraries/main.rs similarity index 100% rename from src/test/run-make/interdependent-c-libraries/main.rs rename to src/test/run-make-fulldeps/interdependent-c-libraries/main.rs diff --git a/src/test/run-make/intrinsic-unreachable/Makefile b/src/test/run-make-fulldeps/intrinsic-unreachable/Makefile similarity index 100% rename from src/test/run-make/intrinsic-unreachable/Makefile rename to src/test/run-make-fulldeps/intrinsic-unreachable/Makefile diff --git a/src/test/run-make/intrinsic-unreachable/exit-ret.rs b/src/test/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs similarity index 100% rename from src/test/run-make/intrinsic-unreachable/exit-ret.rs rename to src/test/run-make-fulldeps/intrinsic-unreachable/exit-ret.rs diff --git a/src/test/run-make/intrinsic-unreachable/exit-unreachable.rs b/src/test/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs similarity index 100% rename from src/test/run-make/intrinsic-unreachable/exit-unreachable.rs rename to src/test/run-make-fulldeps/intrinsic-unreachable/exit-unreachable.rs diff --git a/src/test/run-make/invalid-library/Makefile b/src/test/run-make-fulldeps/invalid-library/Makefile similarity index 100% rename from src/test/run-make/invalid-library/Makefile rename to src/test/run-make-fulldeps/invalid-library/Makefile diff --git a/src/test/run-make/invalid-library/foo.rs b/src/test/run-make-fulldeps/invalid-library/foo.rs similarity index 100% rename from src/test/run-make/invalid-library/foo.rs rename to src/test/run-make-fulldeps/invalid-library/foo.rs diff --git a/src/test/run-make/invalid-staticlib/Makefile b/src/test/run-make-fulldeps/invalid-staticlib/Makefile similarity index 100% rename from src/test/run-make/invalid-staticlib/Makefile rename to src/test/run-make-fulldeps/invalid-staticlib/Makefile diff --git a/src/test/run-make/issue-11908/Makefile b/src/test/run-make-fulldeps/issue-11908/Makefile similarity index 100% rename from src/test/run-make/issue-11908/Makefile rename to src/test/run-make-fulldeps/issue-11908/Makefile diff --git a/src/test/run-make/issue-11908/bar.rs b/src/test/run-make-fulldeps/issue-11908/bar.rs similarity index 100% rename from src/test/run-make/issue-11908/bar.rs rename to src/test/run-make-fulldeps/issue-11908/bar.rs diff --git a/src/test/run-make/issue-11908/foo.rs b/src/test/run-make-fulldeps/issue-11908/foo.rs similarity index 100% rename from src/test/run-make/issue-11908/foo.rs rename to src/test/run-make-fulldeps/issue-11908/foo.rs diff --git a/src/test/run-make/issue-14500/Makefile b/src/test/run-make-fulldeps/issue-14500/Makefile similarity index 100% rename from src/test/run-make/issue-14500/Makefile rename to src/test/run-make-fulldeps/issue-14500/Makefile diff --git a/src/test/run-make/issue-14500/bar.rs b/src/test/run-make-fulldeps/issue-14500/bar.rs similarity index 100% rename from src/test/run-make/issue-14500/bar.rs rename to src/test/run-make-fulldeps/issue-14500/bar.rs diff --git a/src/test/run-make/issue-14500/foo.c b/src/test/run-make-fulldeps/issue-14500/foo.c similarity index 100% rename from src/test/run-make/issue-14500/foo.c rename to src/test/run-make-fulldeps/issue-14500/foo.c diff --git a/src/test/run-make/issue-14500/foo.rs b/src/test/run-make-fulldeps/issue-14500/foo.rs similarity index 100% rename from src/test/run-make/issue-14500/foo.rs rename to src/test/run-make-fulldeps/issue-14500/foo.rs diff --git a/src/test/run-make/issue-14698/Makefile b/src/test/run-make-fulldeps/issue-14698/Makefile similarity index 100% rename from src/test/run-make/issue-14698/Makefile rename to src/test/run-make-fulldeps/issue-14698/Makefile diff --git a/src/test/run-make/issue-14698/foo.rs b/src/test/run-make-fulldeps/issue-14698/foo.rs similarity index 100% rename from src/test/run-make/issue-14698/foo.rs rename to src/test/run-make-fulldeps/issue-14698/foo.rs diff --git a/src/test/run-make/issue-15460/Makefile b/src/test/run-make-fulldeps/issue-15460/Makefile similarity index 100% rename from src/test/run-make/issue-15460/Makefile rename to src/test/run-make-fulldeps/issue-15460/Makefile diff --git a/src/test/run-make/issue-15460/bar.rs b/src/test/run-make-fulldeps/issue-15460/bar.rs similarity index 100% rename from src/test/run-make/issue-15460/bar.rs rename to src/test/run-make-fulldeps/issue-15460/bar.rs diff --git a/src/test/run-make/issue-15460/foo.c b/src/test/run-make-fulldeps/issue-15460/foo.c similarity index 100% rename from src/test/run-make/issue-15460/foo.c rename to src/test/run-make-fulldeps/issue-15460/foo.c diff --git a/src/test/run-make/issue-15460/foo.rs b/src/test/run-make-fulldeps/issue-15460/foo.rs similarity index 100% rename from src/test/run-make/issue-15460/foo.rs rename to src/test/run-make-fulldeps/issue-15460/foo.rs diff --git a/src/test/run-make/issue-18943/Makefile b/src/test/run-make-fulldeps/issue-18943/Makefile similarity index 100% rename from src/test/run-make/issue-18943/Makefile rename to src/test/run-make-fulldeps/issue-18943/Makefile diff --git a/src/test/run-make/issue-18943/foo.rs b/src/test/run-make-fulldeps/issue-18943/foo.rs similarity index 100% rename from src/test/run-make/issue-18943/foo.rs rename to src/test/run-make-fulldeps/issue-18943/foo.rs diff --git a/src/test/run-make/issue-19371/Makefile b/src/test/run-make-fulldeps/issue-19371/Makefile similarity index 100% rename from src/test/run-make/issue-19371/Makefile rename to src/test/run-make-fulldeps/issue-19371/Makefile diff --git a/src/test/run-make/issue-19371/foo.rs b/src/test/run-make-fulldeps/issue-19371/foo.rs similarity index 100% rename from src/test/run-make/issue-19371/foo.rs rename to src/test/run-make-fulldeps/issue-19371/foo.rs diff --git a/src/test/run-make/issue-20626/Makefile b/src/test/run-make-fulldeps/issue-20626/Makefile similarity index 100% rename from src/test/run-make/issue-20626/Makefile rename to src/test/run-make-fulldeps/issue-20626/Makefile diff --git a/src/test/run-make/issue-20626/foo.rs b/src/test/run-make-fulldeps/issue-20626/foo.rs similarity index 100% rename from src/test/run-make/issue-20626/foo.rs rename to src/test/run-make-fulldeps/issue-20626/foo.rs diff --git a/src/test/run-make/issue-22131/Makefile b/src/test/run-make-fulldeps/issue-22131/Makefile similarity index 100% rename from src/test/run-make/issue-22131/Makefile rename to src/test/run-make-fulldeps/issue-22131/Makefile diff --git a/src/test/run-make/issue-22131/foo.rs b/src/test/run-make-fulldeps/issue-22131/foo.rs similarity index 100% rename from src/test/run-make/issue-22131/foo.rs rename to src/test/run-make-fulldeps/issue-22131/foo.rs diff --git a/src/test/run-make/issue-24445/Makefile b/src/test/run-make-fulldeps/issue-24445/Makefile similarity index 100% rename from src/test/run-make/issue-24445/Makefile rename to src/test/run-make-fulldeps/issue-24445/Makefile diff --git a/src/test/run-make/issue-24445/foo.c b/src/test/run-make-fulldeps/issue-24445/foo.c similarity index 100% rename from src/test/run-make/issue-24445/foo.c rename to src/test/run-make-fulldeps/issue-24445/foo.c diff --git a/src/test/run-make/issue-24445/foo.rs b/src/test/run-make-fulldeps/issue-24445/foo.rs similarity index 100% rename from src/test/run-make/issue-24445/foo.rs rename to src/test/run-make-fulldeps/issue-24445/foo.rs diff --git a/src/test/run-make/issue-25581/Makefile b/src/test/run-make-fulldeps/issue-25581/Makefile similarity index 100% rename from src/test/run-make/issue-25581/Makefile rename to src/test/run-make-fulldeps/issue-25581/Makefile diff --git a/src/test/run-make/issue-25581/test.c b/src/test/run-make-fulldeps/issue-25581/test.c similarity index 100% rename from src/test/run-make/issue-25581/test.c rename to src/test/run-make-fulldeps/issue-25581/test.c diff --git a/src/test/run-make/issue-25581/test.rs b/src/test/run-make-fulldeps/issue-25581/test.rs similarity index 100% rename from src/test/run-make/issue-25581/test.rs rename to src/test/run-make-fulldeps/issue-25581/test.rs diff --git a/src/test/run-make/issue-26006/Makefile b/src/test/run-make-fulldeps/issue-26006/Makefile similarity index 100% rename from src/test/run-make/issue-26006/Makefile rename to src/test/run-make-fulldeps/issue-26006/Makefile diff --git a/src/test/run-make/issue-26006/in/libc/lib.rs b/src/test/run-make-fulldeps/issue-26006/in/libc/lib.rs similarity index 100% rename from src/test/run-make/issue-26006/in/libc/lib.rs rename to src/test/run-make-fulldeps/issue-26006/in/libc/lib.rs diff --git a/src/test/run-make/issue-26006/in/time/lib.rs b/src/test/run-make-fulldeps/issue-26006/in/time/lib.rs similarity index 100% rename from src/test/run-make/issue-26006/in/time/lib.rs rename to src/test/run-make-fulldeps/issue-26006/in/time/lib.rs diff --git a/src/test/run-make/issue-26092/Makefile b/src/test/run-make-fulldeps/issue-26092/Makefile similarity index 100% rename from src/test/run-make/issue-26092/Makefile rename to src/test/run-make-fulldeps/issue-26092/Makefile diff --git a/src/test/run-make/issue-26092/blank.rs b/src/test/run-make-fulldeps/issue-26092/blank.rs similarity index 100% rename from src/test/run-make/issue-26092/blank.rs rename to src/test/run-make-fulldeps/issue-26092/blank.rs diff --git a/src/test/run-make/issue-28595/Makefile b/src/test/run-make-fulldeps/issue-28595/Makefile similarity index 100% rename from src/test/run-make/issue-28595/Makefile rename to src/test/run-make-fulldeps/issue-28595/Makefile diff --git a/src/test/run-make/issue-28595/a.c b/src/test/run-make-fulldeps/issue-28595/a.c similarity index 100% rename from src/test/run-make/issue-28595/a.c rename to src/test/run-make-fulldeps/issue-28595/a.c diff --git a/src/test/run-make/issue-28595/a.rs b/src/test/run-make-fulldeps/issue-28595/a.rs similarity index 100% rename from src/test/run-make/issue-28595/a.rs rename to src/test/run-make-fulldeps/issue-28595/a.rs diff --git a/src/test/run-make/issue-28595/b.c b/src/test/run-make-fulldeps/issue-28595/b.c similarity index 100% rename from src/test/run-make/issue-28595/b.c rename to src/test/run-make-fulldeps/issue-28595/b.c diff --git a/src/test/run-make/issue-28595/b.rs b/src/test/run-make-fulldeps/issue-28595/b.rs similarity index 100% rename from src/test/run-make/issue-28595/b.rs rename to src/test/run-make-fulldeps/issue-28595/b.rs diff --git a/src/test/run-make/issue-28766/Makefile b/src/test/run-make-fulldeps/issue-28766/Makefile similarity index 100% rename from src/test/run-make/issue-28766/Makefile rename to src/test/run-make-fulldeps/issue-28766/Makefile diff --git a/src/test/run-make/issue-28766/foo.rs b/src/test/run-make-fulldeps/issue-28766/foo.rs similarity index 100% rename from src/test/run-make/issue-28766/foo.rs rename to src/test/run-make-fulldeps/issue-28766/foo.rs diff --git a/src/test/run-make/issue-28766/main.rs b/src/test/run-make-fulldeps/issue-28766/main.rs similarity index 100% rename from src/test/run-make/issue-28766/main.rs rename to src/test/run-make-fulldeps/issue-28766/main.rs diff --git a/src/test/run-make/issue-30063/Makefile b/src/test/run-make-fulldeps/issue-30063/Makefile similarity index 100% rename from src/test/run-make/issue-30063/Makefile rename to src/test/run-make-fulldeps/issue-30063/Makefile diff --git a/src/test/run-make/issue-30063/foo.rs b/src/test/run-make-fulldeps/issue-30063/foo.rs similarity index 100% rename from src/test/run-make/issue-30063/foo.rs rename to src/test/run-make-fulldeps/issue-30063/foo.rs diff --git a/src/test/run-make/issue-33329/Makefile b/src/test/run-make-fulldeps/issue-33329/Makefile similarity index 100% rename from src/test/run-make/issue-33329/Makefile rename to src/test/run-make-fulldeps/issue-33329/Makefile diff --git a/src/test/run-make/issue-33329/main.rs b/src/test/run-make-fulldeps/issue-33329/main.rs similarity index 100% rename from src/test/run-make/issue-33329/main.rs rename to src/test/run-make-fulldeps/issue-33329/main.rs diff --git a/src/test/run-make/issue-35164/Makefile b/src/test/run-make-fulldeps/issue-35164/Makefile similarity index 100% rename from src/test/run-make/issue-35164/Makefile rename to src/test/run-make-fulldeps/issue-35164/Makefile diff --git a/src/test/run-make/issue-35164/main.rs b/src/test/run-make-fulldeps/issue-35164/main.rs similarity index 100% rename from src/test/run-make/issue-35164/main.rs rename to src/test/run-make-fulldeps/issue-35164/main.rs diff --git a/src/test/run-make/issue-35164/submodule/mod.rs b/src/test/run-make-fulldeps/issue-35164/submodule/mod.rs similarity index 100% rename from src/test/run-make/issue-35164/submodule/mod.rs rename to src/test/run-make-fulldeps/issue-35164/submodule/mod.rs diff --git a/src/test/run-make/issue-37839/Makefile b/src/test/run-make-fulldeps/issue-37839/Makefile similarity index 100% rename from src/test/run-make/issue-37839/Makefile rename to src/test/run-make-fulldeps/issue-37839/Makefile diff --git a/src/test/run-make/issue-37839/a.rs b/src/test/run-make-fulldeps/issue-37839/a.rs similarity index 100% rename from src/test/run-make/issue-37839/a.rs rename to src/test/run-make-fulldeps/issue-37839/a.rs diff --git a/src/test/run-make/issue-37839/b.rs b/src/test/run-make-fulldeps/issue-37839/b.rs similarity index 100% rename from src/test/run-make/issue-37839/b.rs rename to src/test/run-make-fulldeps/issue-37839/b.rs diff --git a/src/test/run-make/issue-37839/c.rs b/src/test/run-make-fulldeps/issue-37839/c.rs similarity index 100% rename from src/test/run-make/issue-37839/c.rs rename to src/test/run-make-fulldeps/issue-37839/c.rs diff --git a/src/test/run-make/issue-37893/Makefile b/src/test/run-make-fulldeps/issue-37893/Makefile similarity index 100% rename from src/test/run-make/issue-37893/Makefile rename to src/test/run-make-fulldeps/issue-37893/Makefile diff --git a/src/test/run-make/issue-37893/a.rs b/src/test/run-make-fulldeps/issue-37893/a.rs similarity index 100% rename from src/test/run-make/issue-37893/a.rs rename to src/test/run-make-fulldeps/issue-37893/a.rs diff --git a/src/test/run-make/issue-37893/b.rs b/src/test/run-make-fulldeps/issue-37893/b.rs similarity index 100% rename from src/test/run-make/issue-37893/b.rs rename to src/test/run-make-fulldeps/issue-37893/b.rs diff --git a/src/test/run-make/issue-37893/c.rs b/src/test/run-make-fulldeps/issue-37893/c.rs similarity index 100% rename from src/test/run-make/issue-37893/c.rs rename to src/test/run-make-fulldeps/issue-37893/c.rs diff --git a/src/test/run-make/issue-38237/Makefile b/src/test/run-make-fulldeps/issue-38237/Makefile similarity index 100% rename from src/test/run-make/issue-38237/Makefile rename to src/test/run-make-fulldeps/issue-38237/Makefile diff --git a/src/test/run-make/issue-38237/bar.rs b/src/test/run-make-fulldeps/issue-38237/bar.rs similarity index 100% rename from src/test/run-make/issue-38237/bar.rs rename to src/test/run-make-fulldeps/issue-38237/bar.rs diff --git a/src/test/run-make/issue-38237/baz.rs b/src/test/run-make-fulldeps/issue-38237/baz.rs similarity index 100% rename from src/test/run-make/issue-38237/baz.rs rename to src/test/run-make-fulldeps/issue-38237/baz.rs diff --git a/src/test/run-make/issue-38237/foo.rs b/src/test/run-make-fulldeps/issue-38237/foo.rs similarity index 100% rename from src/test/run-make/issue-38237/foo.rs rename to src/test/run-make-fulldeps/issue-38237/foo.rs diff --git a/src/test/run-make/issue-40535/Makefile b/src/test/run-make-fulldeps/issue-40535/Makefile similarity index 100% rename from src/test/run-make/issue-40535/Makefile rename to src/test/run-make-fulldeps/issue-40535/Makefile diff --git a/src/test/run-make/issue-40535/bar.rs b/src/test/run-make-fulldeps/issue-40535/bar.rs similarity index 100% rename from src/test/run-make/issue-40535/bar.rs rename to src/test/run-make-fulldeps/issue-40535/bar.rs diff --git a/src/test/run-make/issue-40535/baz.rs b/src/test/run-make-fulldeps/issue-40535/baz.rs similarity index 100% rename from src/test/run-make/issue-40535/baz.rs rename to src/test/run-make-fulldeps/issue-40535/baz.rs diff --git a/src/test/run-make/issue-40535/foo.rs b/src/test/run-make-fulldeps/issue-40535/foo.rs similarity index 100% rename from src/test/run-make/issue-40535/foo.rs rename to src/test/run-make-fulldeps/issue-40535/foo.rs diff --git a/src/test/run-make/issue-46239/Makefile b/src/test/run-make-fulldeps/issue-46239/Makefile similarity index 100% rename from src/test/run-make/issue-46239/Makefile rename to src/test/run-make-fulldeps/issue-46239/Makefile diff --git a/src/test/run-make/issue-46239/main.rs b/src/test/run-make-fulldeps/issue-46239/main.rs similarity index 100% rename from src/test/run-make/issue-46239/main.rs rename to src/test/run-make-fulldeps/issue-46239/main.rs diff --git a/src/test/run-make/issue-7349/Makefile b/src/test/run-make-fulldeps/issue-7349/Makefile similarity index 100% rename from src/test/run-make/issue-7349/Makefile rename to src/test/run-make-fulldeps/issue-7349/Makefile diff --git a/src/test/run-make/issue-7349/foo.rs b/src/test/run-make-fulldeps/issue-7349/foo.rs similarity index 100% rename from src/test/run-make/issue-7349/foo.rs rename to src/test/run-make-fulldeps/issue-7349/foo.rs diff --git a/src/test/run-make/issues-41478-43796/Makefile b/src/test/run-make-fulldeps/issues-41478-43796/Makefile similarity index 100% rename from src/test/run-make/issues-41478-43796/Makefile rename to src/test/run-make-fulldeps/issues-41478-43796/Makefile diff --git a/src/test/run-make/issues-41478-43796/a.rs b/src/test/run-make-fulldeps/issues-41478-43796/a.rs similarity index 100% rename from src/test/run-make/issues-41478-43796/a.rs rename to src/test/run-make-fulldeps/issues-41478-43796/a.rs diff --git a/src/test/run-make/libs-and-bins/Makefile b/src/test/run-make-fulldeps/libs-and-bins/Makefile similarity index 100% rename from src/test/run-make/libs-and-bins/Makefile rename to src/test/run-make-fulldeps/libs-and-bins/Makefile diff --git a/src/test/run-make/libs-and-bins/foo.rs b/src/test/run-make-fulldeps/libs-and-bins/foo.rs similarity index 100% rename from src/test/run-make/libs-and-bins/foo.rs rename to src/test/run-make-fulldeps/libs-and-bins/foo.rs diff --git a/src/test/run-make/libs-through-symlinks/Makefile b/src/test/run-make-fulldeps/libs-through-symlinks/Makefile similarity index 100% rename from src/test/run-make/libs-through-symlinks/Makefile rename to src/test/run-make-fulldeps/libs-through-symlinks/Makefile diff --git a/src/test/run-make/libs-through-symlinks/bar.rs b/src/test/run-make-fulldeps/libs-through-symlinks/bar.rs similarity index 100% rename from src/test/run-make/libs-through-symlinks/bar.rs rename to src/test/run-make-fulldeps/libs-through-symlinks/bar.rs diff --git a/src/test/run-make/libs-through-symlinks/foo.rs b/src/test/run-make-fulldeps/libs-through-symlinks/foo.rs similarity index 100% rename from src/test/run-make/libs-through-symlinks/foo.rs rename to src/test/run-make-fulldeps/libs-through-symlinks/foo.rs diff --git a/src/test/run-make/libtest-json/Makefile b/src/test/run-make-fulldeps/libtest-json/Makefile similarity index 100% rename from src/test/run-make/libtest-json/Makefile rename to src/test/run-make-fulldeps/libtest-json/Makefile diff --git a/src/test/run-make/libtest-json/f.rs b/src/test/run-make-fulldeps/libtest-json/f.rs similarity index 100% rename from src/test/run-make/libtest-json/f.rs rename to src/test/run-make-fulldeps/libtest-json/f.rs diff --git a/src/test/run-make/libtest-json/output.json b/src/test/run-make-fulldeps/libtest-json/output.json similarity index 100% rename from src/test/run-make/libtest-json/output.json rename to src/test/run-make-fulldeps/libtest-json/output.json diff --git a/src/test/run-make/libtest-json/validate_json.py b/src/test/run-make-fulldeps/libtest-json/validate_json.py similarity index 100% rename from src/test/run-make/libtest-json/validate_json.py rename to src/test/run-make-fulldeps/libtest-json/validate_json.py diff --git a/src/test/run-make/link-arg/Makefile b/src/test/run-make-fulldeps/link-arg/Makefile similarity index 100% rename from src/test/run-make/link-arg/Makefile rename to src/test/run-make-fulldeps/link-arg/Makefile diff --git a/src/test/run-make/link-arg/empty.rs b/src/test/run-make-fulldeps/link-arg/empty.rs similarity index 100% rename from src/test/run-make/link-arg/empty.rs rename to src/test/run-make-fulldeps/link-arg/empty.rs diff --git a/src/test/run-make/link-cfg/Makefile b/src/test/run-make-fulldeps/link-cfg/Makefile similarity index 100% rename from src/test/run-make/link-cfg/Makefile rename to src/test/run-make-fulldeps/link-cfg/Makefile diff --git a/src/test/run-make/link-cfg/dep-with-staticlib.rs b/src/test/run-make-fulldeps/link-cfg/dep-with-staticlib.rs similarity index 100% rename from src/test/run-make/link-cfg/dep-with-staticlib.rs rename to src/test/run-make-fulldeps/link-cfg/dep-with-staticlib.rs diff --git a/src/test/run-make/link-cfg/dep.rs b/src/test/run-make-fulldeps/link-cfg/dep.rs similarity index 100% rename from src/test/run-make/link-cfg/dep.rs rename to src/test/run-make-fulldeps/link-cfg/dep.rs diff --git a/src/test/run-make/link-cfg/no-deps.rs b/src/test/run-make-fulldeps/link-cfg/no-deps.rs similarity index 100% rename from src/test/run-make/link-cfg/no-deps.rs rename to src/test/run-make-fulldeps/link-cfg/no-deps.rs diff --git a/src/test/run-make/link-cfg/return1.c b/src/test/run-make-fulldeps/link-cfg/return1.c similarity index 100% rename from src/test/run-make/link-cfg/return1.c rename to src/test/run-make-fulldeps/link-cfg/return1.c diff --git a/src/test/run-make/link-cfg/return2.c b/src/test/run-make-fulldeps/link-cfg/return2.c similarity index 100% rename from src/test/run-make/link-cfg/return2.c rename to src/test/run-make-fulldeps/link-cfg/return2.c diff --git a/src/test/run-make/link-cfg/return3.c b/src/test/run-make-fulldeps/link-cfg/return3.c similarity index 100% rename from src/test/run-make/link-cfg/return3.c rename to src/test/run-make-fulldeps/link-cfg/return3.c diff --git a/src/test/run-make/link-cfg/with-deps.rs b/src/test/run-make-fulldeps/link-cfg/with-deps.rs similarity index 100% rename from src/test/run-make/link-cfg/with-deps.rs rename to src/test/run-make-fulldeps/link-cfg/with-deps.rs diff --git a/src/test/run-make/link-cfg/with-staticlib-deps.rs b/src/test/run-make-fulldeps/link-cfg/with-staticlib-deps.rs similarity index 100% rename from src/test/run-make/link-cfg/with-staticlib-deps.rs rename to src/test/run-make-fulldeps/link-cfg/with-staticlib-deps.rs diff --git a/src/test/run-make/link-path-order/Makefile b/src/test/run-make-fulldeps/link-path-order/Makefile similarity index 100% rename from src/test/run-make/link-path-order/Makefile rename to src/test/run-make-fulldeps/link-path-order/Makefile diff --git a/src/test/run-make/link-path-order/correct.c b/src/test/run-make-fulldeps/link-path-order/correct.c similarity index 100% rename from src/test/run-make/link-path-order/correct.c rename to src/test/run-make-fulldeps/link-path-order/correct.c diff --git a/src/test/run-make/link-path-order/main.rs b/src/test/run-make-fulldeps/link-path-order/main.rs similarity index 100% rename from src/test/run-make/link-path-order/main.rs rename to src/test/run-make-fulldeps/link-path-order/main.rs diff --git a/src/test/run-make/link-path-order/wrong.c b/src/test/run-make-fulldeps/link-path-order/wrong.c similarity index 100% rename from src/test/run-make/link-path-order/wrong.c rename to src/test/run-make-fulldeps/link-path-order/wrong.c diff --git a/src/test/run-make/linkage-attr-on-static/Makefile b/src/test/run-make-fulldeps/linkage-attr-on-static/Makefile similarity index 100% rename from src/test/run-make/linkage-attr-on-static/Makefile rename to src/test/run-make-fulldeps/linkage-attr-on-static/Makefile diff --git a/src/test/run-make/linkage-attr-on-static/bar.rs b/src/test/run-make-fulldeps/linkage-attr-on-static/bar.rs similarity index 100% rename from src/test/run-make/linkage-attr-on-static/bar.rs rename to src/test/run-make-fulldeps/linkage-attr-on-static/bar.rs diff --git a/src/test/run-make/linkage-attr-on-static/foo.c b/src/test/run-make-fulldeps/linkage-attr-on-static/foo.c similarity index 100% rename from src/test/run-make/linkage-attr-on-static/foo.c rename to src/test/run-make-fulldeps/linkage-attr-on-static/foo.c diff --git a/src/test/run-make/linker-output-non-utf8/Makefile b/src/test/run-make-fulldeps/linker-output-non-utf8/Makefile similarity index 100% rename from src/test/run-make/linker-output-non-utf8/Makefile rename to src/test/run-make-fulldeps/linker-output-non-utf8/Makefile diff --git a/src/test/run-make/linker-output-non-utf8/exec.rs b/src/test/run-make-fulldeps/linker-output-non-utf8/exec.rs similarity index 100% rename from src/test/run-make/linker-output-non-utf8/exec.rs rename to src/test/run-make-fulldeps/linker-output-non-utf8/exec.rs diff --git a/src/test/run-make/linker-output-non-utf8/library.rs b/src/test/run-make-fulldeps/linker-output-non-utf8/library.rs similarity index 100% rename from src/test/run-make/linker-output-non-utf8/library.rs rename to src/test/run-make-fulldeps/linker-output-non-utf8/library.rs diff --git a/src/test/run-make/llvm-pass/Makefile b/src/test/run-make-fulldeps/llvm-pass/Makefile similarity index 100% rename from src/test/run-make/llvm-pass/Makefile rename to src/test/run-make-fulldeps/llvm-pass/Makefile diff --git a/src/test/run-make/llvm-pass/llvm-function-pass.so.cc b/src/test/run-make-fulldeps/llvm-pass/llvm-function-pass.so.cc similarity index 100% rename from src/test/run-make/llvm-pass/llvm-function-pass.so.cc rename to src/test/run-make-fulldeps/llvm-pass/llvm-function-pass.so.cc diff --git a/src/test/run-make/llvm-pass/llvm-module-pass.so.cc b/src/test/run-make-fulldeps/llvm-pass/llvm-module-pass.so.cc similarity index 100% rename from src/test/run-make/llvm-pass/llvm-module-pass.so.cc rename to src/test/run-make-fulldeps/llvm-pass/llvm-module-pass.so.cc diff --git a/src/test/run-make/llvm-pass/main.rs b/src/test/run-make-fulldeps/llvm-pass/main.rs similarity index 100% rename from src/test/run-make/llvm-pass/main.rs rename to src/test/run-make-fulldeps/llvm-pass/main.rs diff --git a/src/test/run-make/llvm-pass/plugin.rs b/src/test/run-make-fulldeps/llvm-pass/plugin.rs similarity index 100% rename from src/test/run-make/llvm-pass/plugin.rs rename to src/test/run-make-fulldeps/llvm-pass/plugin.rs diff --git a/src/test/run-make/long-linker-command-lines-cmd-exe/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/Makefile similarity index 100% rename from src/test/run-make/long-linker-command-lines-cmd-exe/Makefile rename to src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/Makefile diff --git a/src/test/run-make/long-linker-command-lines-cmd-exe/foo.bat b/src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.bat similarity index 100% rename from src/test/run-make/long-linker-command-lines-cmd-exe/foo.bat rename to src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.bat diff --git a/src/test/run-make/long-linker-command-lines-cmd-exe/foo.rs b/src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.rs similarity index 100% rename from src/test/run-make/long-linker-command-lines-cmd-exe/foo.rs rename to src/test/run-make-fulldeps/long-linker-command-lines-cmd-exe/foo.rs diff --git a/src/test/run-make/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile similarity index 100% rename from src/test/run-make/long-linker-command-lines/Makefile rename to src/test/run-make-fulldeps/long-linker-command-lines/Makefile diff --git a/src/test/run-make/long-linker-command-lines/foo.rs b/src/test/run-make-fulldeps/long-linker-command-lines/foo.rs similarity index 100% rename from src/test/run-make/long-linker-command-lines/foo.rs rename to src/test/run-make-fulldeps/long-linker-command-lines/foo.rs diff --git a/src/test/run-make/longjmp-across-rust/Makefile b/src/test/run-make-fulldeps/longjmp-across-rust/Makefile similarity index 100% rename from src/test/run-make/longjmp-across-rust/Makefile rename to src/test/run-make-fulldeps/longjmp-across-rust/Makefile diff --git a/src/test/run-make/longjmp-across-rust/foo.c b/src/test/run-make-fulldeps/longjmp-across-rust/foo.c similarity index 100% rename from src/test/run-make/longjmp-across-rust/foo.c rename to src/test/run-make-fulldeps/longjmp-across-rust/foo.c diff --git a/src/test/run-make/longjmp-across-rust/main.rs b/src/test/run-make-fulldeps/longjmp-across-rust/main.rs similarity index 100% rename from src/test/run-make/longjmp-across-rust/main.rs rename to src/test/run-make-fulldeps/longjmp-across-rust/main.rs diff --git a/src/test/run-make/ls-metadata/Makefile b/src/test/run-make-fulldeps/ls-metadata/Makefile similarity index 100% rename from src/test/run-make/ls-metadata/Makefile rename to src/test/run-make-fulldeps/ls-metadata/Makefile diff --git a/src/test/run-make/ls-metadata/foo.rs b/src/test/run-make-fulldeps/ls-metadata/foo.rs similarity index 100% rename from src/test/run-make/ls-metadata/foo.rs rename to src/test/run-make-fulldeps/ls-metadata/foo.rs diff --git a/src/test/run-make/lto-no-link-whole-rlib/Makefile b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/Makefile similarity index 100% rename from src/test/run-make/lto-no-link-whole-rlib/Makefile rename to src/test/run-make-fulldeps/lto-no-link-whole-rlib/Makefile diff --git a/src/test/run-make/lto-no-link-whole-rlib/bar.c b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/bar.c similarity index 100% rename from src/test/run-make/lto-no-link-whole-rlib/bar.c rename to src/test/run-make-fulldeps/lto-no-link-whole-rlib/bar.c diff --git a/src/test/run-make/lto-no-link-whole-rlib/foo.c b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/foo.c similarity index 100% rename from src/test/run-make/lto-no-link-whole-rlib/foo.c rename to src/test/run-make-fulldeps/lto-no-link-whole-rlib/foo.c diff --git a/src/test/run-make/lto-no-link-whole-rlib/lib1.rs b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib1.rs similarity index 100% rename from src/test/run-make/lto-no-link-whole-rlib/lib1.rs rename to src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib1.rs diff --git a/src/test/run-make/lto-no-link-whole-rlib/lib2.rs b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs similarity index 100% rename from src/test/run-make/lto-no-link-whole-rlib/lib2.rs rename to src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs diff --git a/src/test/run-make/lto-no-link-whole-rlib/main.rs b/src/test/run-make-fulldeps/lto-no-link-whole-rlib/main.rs similarity index 100% rename from src/test/run-make/lto-no-link-whole-rlib/main.rs rename to src/test/run-make-fulldeps/lto-no-link-whole-rlib/main.rs diff --git a/src/test/run-make/lto-readonly-lib/Makefile b/src/test/run-make-fulldeps/lto-readonly-lib/Makefile similarity index 100% rename from src/test/run-make/lto-readonly-lib/Makefile rename to src/test/run-make-fulldeps/lto-readonly-lib/Makefile diff --git a/src/test/run-make/lto-readonly-lib/lib.rs b/src/test/run-make-fulldeps/lto-readonly-lib/lib.rs similarity index 100% rename from src/test/run-make/lto-readonly-lib/lib.rs rename to src/test/run-make-fulldeps/lto-readonly-lib/lib.rs diff --git a/src/test/run-make/lto-readonly-lib/main.rs b/src/test/run-make-fulldeps/lto-readonly-lib/main.rs similarity index 100% rename from src/test/run-make/lto-readonly-lib/main.rs rename to src/test/run-make-fulldeps/lto-readonly-lib/main.rs diff --git a/src/test/run-make/lto-smoke-c/Makefile b/src/test/run-make-fulldeps/lto-smoke-c/Makefile similarity index 100% rename from src/test/run-make/lto-smoke-c/Makefile rename to src/test/run-make-fulldeps/lto-smoke-c/Makefile diff --git a/src/test/run-make/lto-smoke-c/bar.c b/src/test/run-make-fulldeps/lto-smoke-c/bar.c similarity index 100% rename from src/test/run-make/lto-smoke-c/bar.c rename to src/test/run-make-fulldeps/lto-smoke-c/bar.c diff --git a/src/test/run-make/lto-smoke-c/foo.rs b/src/test/run-make-fulldeps/lto-smoke-c/foo.rs similarity index 100% rename from src/test/run-make/lto-smoke-c/foo.rs rename to src/test/run-make-fulldeps/lto-smoke-c/foo.rs diff --git a/src/test/run-make/lto-smoke/Makefile b/src/test/run-make-fulldeps/lto-smoke/Makefile similarity index 100% rename from src/test/run-make/lto-smoke/Makefile rename to src/test/run-make-fulldeps/lto-smoke/Makefile diff --git a/src/test/run-make/lto-smoke/lib.rs b/src/test/run-make-fulldeps/lto-smoke/lib.rs similarity index 100% rename from src/test/run-make/lto-smoke/lib.rs rename to src/test/run-make-fulldeps/lto-smoke/lib.rs diff --git a/src/test/run-make/lto-smoke/main.rs b/src/test/run-make-fulldeps/lto-smoke/main.rs similarity index 100% rename from src/test/run-make/lto-smoke/main.rs rename to src/test/run-make-fulldeps/lto-smoke/main.rs diff --git a/src/test/run-make/manual-crate-name/Makefile b/src/test/run-make-fulldeps/manual-crate-name/Makefile similarity index 100% rename from src/test/run-make/manual-crate-name/Makefile rename to src/test/run-make-fulldeps/manual-crate-name/Makefile diff --git a/src/test/run-make/manual-crate-name/bar.rs b/src/test/run-make-fulldeps/manual-crate-name/bar.rs similarity index 100% rename from src/test/run-make/manual-crate-name/bar.rs rename to src/test/run-make-fulldeps/manual-crate-name/bar.rs diff --git a/src/test/run-make/manual-link/Makefile b/src/test/run-make-fulldeps/manual-link/Makefile similarity index 100% rename from src/test/run-make/manual-link/Makefile rename to src/test/run-make-fulldeps/manual-link/Makefile diff --git a/src/test/run-make/manual-link/bar.c b/src/test/run-make-fulldeps/manual-link/bar.c similarity index 100% rename from src/test/run-make/manual-link/bar.c rename to src/test/run-make-fulldeps/manual-link/bar.c diff --git a/src/test/run-make/manual-link/foo.c b/src/test/run-make-fulldeps/manual-link/foo.c similarity index 100% rename from src/test/run-make/manual-link/foo.c rename to src/test/run-make-fulldeps/manual-link/foo.c diff --git a/src/test/run-make/manual-link/foo.rs b/src/test/run-make-fulldeps/manual-link/foo.rs similarity index 100% rename from src/test/run-make/manual-link/foo.rs rename to src/test/run-make-fulldeps/manual-link/foo.rs diff --git a/src/test/run-make/manual-link/main.rs b/src/test/run-make-fulldeps/manual-link/main.rs similarity index 100% rename from src/test/run-make/manual-link/main.rs rename to src/test/run-make-fulldeps/manual-link/main.rs diff --git a/src/test/run-make/many-crates-but-no-match/Makefile b/src/test/run-make-fulldeps/many-crates-but-no-match/Makefile similarity index 100% rename from src/test/run-make/many-crates-but-no-match/Makefile rename to src/test/run-make-fulldeps/many-crates-but-no-match/Makefile diff --git a/src/test/run-make/many-crates-but-no-match/crateA1.rs b/src/test/run-make-fulldeps/many-crates-but-no-match/crateA1.rs similarity index 100% rename from src/test/run-make/many-crates-but-no-match/crateA1.rs rename to src/test/run-make-fulldeps/many-crates-but-no-match/crateA1.rs diff --git a/src/test/run-make/many-crates-but-no-match/crateA2.rs b/src/test/run-make-fulldeps/many-crates-but-no-match/crateA2.rs similarity index 100% rename from src/test/run-make/many-crates-but-no-match/crateA2.rs rename to src/test/run-make-fulldeps/many-crates-but-no-match/crateA2.rs diff --git a/src/test/run-make/many-crates-but-no-match/crateA3.rs b/src/test/run-make-fulldeps/many-crates-but-no-match/crateA3.rs similarity index 100% rename from src/test/run-make/many-crates-but-no-match/crateA3.rs rename to src/test/run-make-fulldeps/many-crates-but-no-match/crateA3.rs diff --git a/src/test/run-make/many-crates-but-no-match/crateB.rs b/src/test/run-make-fulldeps/many-crates-but-no-match/crateB.rs similarity index 100% rename from src/test/run-make/many-crates-but-no-match/crateB.rs rename to src/test/run-make-fulldeps/many-crates-but-no-match/crateB.rs diff --git a/src/test/run-make/many-crates-but-no-match/crateC.rs b/src/test/run-make-fulldeps/many-crates-but-no-match/crateC.rs similarity index 100% rename from src/test/run-make/many-crates-but-no-match/crateC.rs rename to src/test/run-make-fulldeps/many-crates-but-no-match/crateC.rs diff --git a/src/test/run-make/metadata-flag-frobs-symbols/Makefile b/src/test/run-make-fulldeps/metadata-flag-frobs-symbols/Makefile similarity index 100% rename from src/test/run-make/metadata-flag-frobs-symbols/Makefile rename to src/test/run-make-fulldeps/metadata-flag-frobs-symbols/Makefile diff --git a/src/test/run-make/metadata-flag-frobs-symbols/bar.rs b/src/test/run-make-fulldeps/metadata-flag-frobs-symbols/bar.rs similarity index 100% rename from src/test/run-make/metadata-flag-frobs-symbols/bar.rs rename to src/test/run-make-fulldeps/metadata-flag-frobs-symbols/bar.rs diff --git a/src/test/run-make/metadata-flag-frobs-symbols/foo.rs b/src/test/run-make-fulldeps/metadata-flag-frobs-symbols/foo.rs similarity index 100% rename from src/test/run-make/metadata-flag-frobs-symbols/foo.rs rename to src/test/run-make-fulldeps/metadata-flag-frobs-symbols/foo.rs diff --git a/src/test/run-make/min-global-align/Makefile b/src/test/run-make-fulldeps/min-global-align/Makefile similarity index 100% rename from src/test/run-make/min-global-align/Makefile rename to src/test/run-make-fulldeps/min-global-align/Makefile diff --git a/src/test/run-make/min-global-align/min_global_align.rs b/src/test/run-make-fulldeps/min-global-align/min_global_align.rs similarity index 100% rename from src/test/run-make/min-global-align/min_global_align.rs rename to src/test/run-make-fulldeps/min-global-align/min_global_align.rs diff --git a/src/test/run-make/mismatching-target-triples/Makefile b/src/test/run-make-fulldeps/mismatching-target-triples/Makefile similarity index 100% rename from src/test/run-make/mismatching-target-triples/Makefile rename to src/test/run-make-fulldeps/mismatching-target-triples/Makefile diff --git a/src/test/run-make/mismatching-target-triples/bar.rs b/src/test/run-make-fulldeps/mismatching-target-triples/bar.rs similarity index 100% rename from src/test/run-make/mismatching-target-triples/bar.rs rename to src/test/run-make-fulldeps/mismatching-target-triples/bar.rs diff --git a/src/test/run-make/mismatching-target-triples/foo.rs b/src/test/run-make-fulldeps/mismatching-target-triples/foo.rs similarity index 100% rename from src/test/run-make/mismatching-target-triples/foo.rs rename to src/test/run-make-fulldeps/mismatching-target-triples/foo.rs diff --git a/src/test/run-make/missing-crate-dependency/Makefile b/src/test/run-make-fulldeps/missing-crate-dependency/Makefile similarity index 100% rename from src/test/run-make/missing-crate-dependency/Makefile rename to src/test/run-make-fulldeps/missing-crate-dependency/Makefile diff --git a/src/test/run-make/missing-crate-dependency/crateA.rs b/src/test/run-make-fulldeps/missing-crate-dependency/crateA.rs similarity index 100% rename from src/test/run-make/missing-crate-dependency/crateA.rs rename to src/test/run-make-fulldeps/missing-crate-dependency/crateA.rs diff --git a/src/test/run-make/missing-crate-dependency/crateB.rs b/src/test/run-make-fulldeps/missing-crate-dependency/crateB.rs similarity index 100% rename from src/test/run-make/missing-crate-dependency/crateB.rs rename to src/test/run-make-fulldeps/missing-crate-dependency/crateB.rs diff --git a/src/test/run-make/missing-crate-dependency/crateC.rs b/src/test/run-make-fulldeps/missing-crate-dependency/crateC.rs similarity index 100% rename from src/test/run-make/missing-crate-dependency/crateC.rs rename to src/test/run-make-fulldeps/missing-crate-dependency/crateC.rs diff --git a/src/test/run-make/mixing-deps/Makefile b/src/test/run-make-fulldeps/mixing-deps/Makefile similarity index 100% rename from src/test/run-make/mixing-deps/Makefile rename to src/test/run-make-fulldeps/mixing-deps/Makefile diff --git a/src/test/run-make/mixing-deps/both.rs b/src/test/run-make-fulldeps/mixing-deps/both.rs similarity index 100% rename from src/test/run-make/mixing-deps/both.rs rename to src/test/run-make-fulldeps/mixing-deps/both.rs diff --git a/src/test/run-make/mixing-deps/dylib.rs b/src/test/run-make-fulldeps/mixing-deps/dylib.rs similarity index 100% rename from src/test/run-make/mixing-deps/dylib.rs rename to src/test/run-make-fulldeps/mixing-deps/dylib.rs diff --git a/src/test/run-make/mixing-deps/prog.rs b/src/test/run-make-fulldeps/mixing-deps/prog.rs similarity index 100% rename from src/test/run-make/mixing-deps/prog.rs rename to src/test/run-make-fulldeps/mixing-deps/prog.rs diff --git a/src/test/run-make/mixing-formats/Makefile b/src/test/run-make-fulldeps/mixing-formats/Makefile similarity index 100% rename from src/test/run-make/mixing-formats/Makefile rename to src/test/run-make-fulldeps/mixing-formats/Makefile diff --git a/src/test/run-make/mixing-formats/bar1.rs b/src/test/run-make-fulldeps/mixing-formats/bar1.rs similarity index 100% rename from src/test/run-make/mixing-formats/bar1.rs rename to src/test/run-make-fulldeps/mixing-formats/bar1.rs diff --git a/src/test/run-make/mixing-formats/bar2.rs b/src/test/run-make-fulldeps/mixing-formats/bar2.rs similarity index 100% rename from src/test/run-make/mixing-formats/bar2.rs rename to src/test/run-make-fulldeps/mixing-formats/bar2.rs diff --git a/src/test/run-make/mixing-formats/baz.rs b/src/test/run-make-fulldeps/mixing-formats/baz.rs similarity index 100% rename from src/test/run-make/mixing-formats/baz.rs rename to src/test/run-make-fulldeps/mixing-formats/baz.rs diff --git a/src/test/run-make/mixing-formats/baz2.rs b/src/test/run-make-fulldeps/mixing-formats/baz2.rs similarity index 100% rename from src/test/run-make/mixing-formats/baz2.rs rename to src/test/run-make-fulldeps/mixing-formats/baz2.rs diff --git a/src/test/run-make/mixing-formats/foo.rs b/src/test/run-make-fulldeps/mixing-formats/foo.rs similarity index 100% rename from src/test/run-make/mixing-formats/foo.rs rename to src/test/run-make-fulldeps/mixing-formats/foo.rs diff --git a/src/test/run-make/mixing-libs/Makefile b/src/test/run-make-fulldeps/mixing-libs/Makefile similarity index 100% rename from src/test/run-make/mixing-libs/Makefile rename to src/test/run-make-fulldeps/mixing-libs/Makefile diff --git a/src/test/run-make/mixing-libs/dylib.rs b/src/test/run-make-fulldeps/mixing-libs/dylib.rs similarity index 100% rename from src/test/run-make/mixing-libs/dylib.rs rename to src/test/run-make-fulldeps/mixing-libs/dylib.rs diff --git a/src/test/run-make/mixing-libs/prog.rs b/src/test/run-make-fulldeps/mixing-libs/prog.rs similarity index 100% rename from src/test/run-make/mixing-libs/prog.rs rename to src/test/run-make-fulldeps/mixing-libs/prog.rs diff --git a/src/test/run-make/mixing-libs/rlib.rs b/src/test/run-make-fulldeps/mixing-libs/rlib.rs similarity index 100% rename from src/test/run-make/mixing-libs/rlib.rs rename to src/test/run-make-fulldeps/mixing-libs/rlib.rs diff --git a/src/test/run-make/msvc-opt-minsize/Makefile b/src/test/run-make-fulldeps/msvc-opt-minsize/Makefile similarity index 100% rename from src/test/run-make/msvc-opt-minsize/Makefile rename to src/test/run-make-fulldeps/msvc-opt-minsize/Makefile diff --git a/src/test/run-make/msvc-opt-minsize/foo.rs b/src/test/run-make-fulldeps/msvc-opt-minsize/foo.rs similarity index 100% rename from src/test/run-make/msvc-opt-minsize/foo.rs rename to src/test/run-make-fulldeps/msvc-opt-minsize/foo.rs diff --git a/src/test/run-make/multiple-emits/Makefile b/src/test/run-make-fulldeps/multiple-emits/Makefile similarity index 100% rename from src/test/run-make/multiple-emits/Makefile rename to src/test/run-make-fulldeps/multiple-emits/Makefile diff --git a/src/test/run-make/multiple-emits/foo.rs b/src/test/run-make-fulldeps/multiple-emits/foo.rs similarity index 100% rename from src/test/run-make/multiple-emits/foo.rs rename to src/test/run-make-fulldeps/multiple-emits/foo.rs diff --git a/src/test/run-make/no-builtins-lto/Makefile b/src/test/run-make-fulldeps/no-builtins-lto/Makefile similarity index 100% rename from src/test/run-make/no-builtins-lto/Makefile rename to src/test/run-make-fulldeps/no-builtins-lto/Makefile diff --git a/src/test/run-make/no-builtins-lto/main.rs b/src/test/run-make-fulldeps/no-builtins-lto/main.rs similarity index 100% rename from src/test/run-make/no-builtins-lto/main.rs rename to src/test/run-make-fulldeps/no-builtins-lto/main.rs diff --git a/src/test/run-make/no-builtins-lto/no_builtins.rs b/src/test/run-make-fulldeps/no-builtins-lto/no_builtins.rs similarity index 100% rename from src/test/run-make/no-builtins-lto/no_builtins.rs rename to src/test/run-make-fulldeps/no-builtins-lto/no_builtins.rs diff --git a/src/test/run-make/no-duplicate-libs/Makefile b/src/test/run-make-fulldeps/no-duplicate-libs/Makefile similarity index 100% rename from src/test/run-make/no-duplicate-libs/Makefile rename to src/test/run-make-fulldeps/no-duplicate-libs/Makefile diff --git a/src/test/run-make/no-duplicate-libs/bar.c b/src/test/run-make-fulldeps/no-duplicate-libs/bar.c similarity index 100% rename from src/test/run-make/no-duplicate-libs/bar.c rename to src/test/run-make-fulldeps/no-duplicate-libs/bar.c diff --git a/src/test/run-make/no-duplicate-libs/foo.c b/src/test/run-make-fulldeps/no-duplicate-libs/foo.c similarity index 100% rename from src/test/run-make/no-duplicate-libs/foo.c rename to src/test/run-make-fulldeps/no-duplicate-libs/foo.c diff --git a/src/test/run-make/no-duplicate-libs/main.rs b/src/test/run-make-fulldeps/no-duplicate-libs/main.rs similarity index 100% rename from src/test/run-make/no-duplicate-libs/main.rs rename to src/test/run-make-fulldeps/no-duplicate-libs/main.rs diff --git a/src/test/run-make/no-integrated-as/Makefile b/src/test/run-make-fulldeps/no-integrated-as/Makefile similarity index 100% rename from src/test/run-make/no-integrated-as/Makefile rename to src/test/run-make-fulldeps/no-integrated-as/Makefile diff --git a/src/test/run-make/no-integrated-as/hello.rs b/src/test/run-make-fulldeps/no-integrated-as/hello.rs similarity index 100% rename from src/test/run-make/no-integrated-as/hello.rs rename to src/test/run-make-fulldeps/no-integrated-as/hello.rs diff --git a/src/test/run-make/no-intermediate-extras/Makefile b/src/test/run-make-fulldeps/no-intermediate-extras/Makefile similarity index 100% rename from src/test/run-make/no-intermediate-extras/Makefile rename to src/test/run-make-fulldeps/no-intermediate-extras/Makefile diff --git a/src/test/run-make/no-intermediate-extras/foo.rs b/src/test/run-make-fulldeps/no-intermediate-extras/foo.rs similarity index 100% rename from src/test/run-make/no-intermediate-extras/foo.rs rename to src/test/run-make-fulldeps/no-intermediate-extras/foo.rs diff --git a/src/test/run-make/obey-crate-type-flag/Makefile b/src/test/run-make-fulldeps/obey-crate-type-flag/Makefile similarity index 100% rename from src/test/run-make/obey-crate-type-flag/Makefile rename to src/test/run-make-fulldeps/obey-crate-type-flag/Makefile diff --git a/src/test/run-make/obey-crate-type-flag/test.rs b/src/test/run-make-fulldeps/obey-crate-type-flag/test.rs similarity index 100% rename from src/test/run-make/obey-crate-type-flag/test.rs rename to src/test/run-make-fulldeps/obey-crate-type-flag/test.rs diff --git a/src/test/run-make/output-filename-conflicts-with-directory/Makefile b/src/test/run-make-fulldeps/output-filename-conflicts-with-directory/Makefile similarity index 100% rename from src/test/run-make/output-filename-conflicts-with-directory/Makefile rename to src/test/run-make-fulldeps/output-filename-conflicts-with-directory/Makefile diff --git a/src/test/run-make/output-filename-conflicts-with-directory/foo.rs b/src/test/run-make-fulldeps/output-filename-conflicts-with-directory/foo.rs similarity index 100% rename from src/test/run-make/output-filename-conflicts-with-directory/foo.rs rename to src/test/run-make-fulldeps/output-filename-conflicts-with-directory/foo.rs diff --git a/src/test/run-make/output-filename-overwrites-input/Makefile b/src/test/run-make-fulldeps/output-filename-overwrites-input/Makefile similarity index 100% rename from src/test/run-make/output-filename-overwrites-input/Makefile rename to src/test/run-make-fulldeps/output-filename-overwrites-input/Makefile diff --git a/src/test/run-make/output-filename-overwrites-input/bar.rs b/src/test/run-make-fulldeps/output-filename-overwrites-input/bar.rs similarity index 100% rename from src/test/run-make/output-filename-overwrites-input/bar.rs rename to src/test/run-make-fulldeps/output-filename-overwrites-input/bar.rs diff --git a/src/test/run-make/output-filename-overwrites-input/foo.rs b/src/test/run-make-fulldeps/output-filename-overwrites-input/foo.rs similarity index 100% rename from src/test/run-make/output-filename-overwrites-input/foo.rs rename to src/test/run-make-fulldeps/output-filename-overwrites-input/foo.rs diff --git a/src/test/run-make/output-type-permutations/Makefile b/src/test/run-make-fulldeps/output-type-permutations/Makefile similarity index 100% rename from src/test/run-make/output-type-permutations/Makefile rename to src/test/run-make-fulldeps/output-type-permutations/Makefile diff --git a/src/test/run-make/output-type-permutations/foo.rs b/src/test/run-make-fulldeps/output-type-permutations/foo.rs similarity index 100% rename from src/test/run-make/output-type-permutations/foo.rs rename to src/test/run-make-fulldeps/output-type-permutations/foo.rs diff --git a/src/test/run-make/output-with-hyphens/Makefile b/src/test/run-make-fulldeps/output-with-hyphens/Makefile similarity index 100% rename from src/test/run-make/output-with-hyphens/Makefile rename to src/test/run-make-fulldeps/output-with-hyphens/Makefile diff --git a/src/test/run-make/output-with-hyphens/foo-bar.rs b/src/test/run-make-fulldeps/output-with-hyphens/foo-bar.rs similarity index 100% rename from src/test/run-make/output-with-hyphens/foo-bar.rs rename to src/test/run-make-fulldeps/output-with-hyphens/foo-bar.rs diff --git a/src/test/run-make/prefer-dylib/Makefile b/src/test/run-make-fulldeps/prefer-dylib/Makefile similarity index 100% rename from src/test/run-make/prefer-dylib/Makefile rename to src/test/run-make-fulldeps/prefer-dylib/Makefile diff --git a/src/test/run-make/prefer-dylib/bar.rs b/src/test/run-make-fulldeps/prefer-dylib/bar.rs similarity index 100% rename from src/test/run-make/prefer-dylib/bar.rs rename to src/test/run-make-fulldeps/prefer-dylib/bar.rs diff --git a/src/test/run-make/prefer-dylib/foo.rs b/src/test/run-make-fulldeps/prefer-dylib/foo.rs similarity index 100% rename from src/test/run-make/prefer-dylib/foo.rs rename to src/test/run-make-fulldeps/prefer-dylib/foo.rs diff --git a/src/test/run-make/prefer-rlib/Makefile b/src/test/run-make-fulldeps/prefer-rlib/Makefile similarity index 100% rename from src/test/run-make/prefer-rlib/Makefile rename to src/test/run-make-fulldeps/prefer-rlib/Makefile diff --git a/src/test/run-make/prefer-rlib/bar.rs b/src/test/run-make-fulldeps/prefer-rlib/bar.rs similarity index 100% rename from src/test/run-make/prefer-rlib/bar.rs rename to src/test/run-make-fulldeps/prefer-rlib/bar.rs diff --git a/src/test/run-make/prefer-rlib/foo.rs b/src/test/run-make-fulldeps/prefer-rlib/foo.rs similarity index 100% rename from src/test/run-make/prefer-rlib/foo.rs rename to src/test/run-make-fulldeps/prefer-rlib/foo.rs diff --git a/src/test/run-make/pretty-expanded-hygiene/Makefile b/src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile similarity index 100% rename from src/test/run-make/pretty-expanded-hygiene/Makefile rename to src/test/run-make-fulldeps/pretty-expanded-hygiene/Makefile diff --git a/src/test/run-make/pretty-expanded-hygiene/input.pp.rs b/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.pp.rs similarity index 100% rename from src/test/run-make/pretty-expanded-hygiene/input.pp.rs rename to src/test/run-make-fulldeps/pretty-expanded-hygiene/input.pp.rs diff --git a/src/test/run-make/pretty-expanded-hygiene/input.rs b/src/test/run-make-fulldeps/pretty-expanded-hygiene/input.rs similarity index 100% rename from src/test/run-make/pretty-expanded-hygiene/input.rs rename to src/test/run-make-fulldeps/pretty-expanded-hygiene/input.rs diff --git a/src/test/run-make/pretty-expanded/Makefile b/src/test/run-make-fulldeps/pretty-expanded/Makefile similarity index 100% rename from src/test/run-make/pretty-expanded/Makefile rename to src/test/run-make-fulldeps/pretty-expanded/Makefile diff --git a/src/test/run-make/pretty-expanded/input.rs b/src/test/run-make-fulldeps/pretty-expanded/input.rs similarity index 100% rename from src/test/run-make/pretty-expanded/input.rs rename to src/test/run-make-fulldeps/pretty-expanded/input.rs diff --git a/src/test/run-make/pretty-print-path-suffix/Makefile b/src/test/run-make-fulldeps/pretty-print-path-suffix/Makefile similarity index 100% rename from src/test/run-make/pretty-print-path-suffix/Makefile rename to src/test/run-make-fulldeps/pretty-print-path-suffix/Makefile diff --git a/src/test/run-make/pretty-print-path-suffix/foo.pp b/src/test/run-make-fulldeps/pretty-print-path-suffix/foo.pp similarity index 100% rename from src/test/run-make/pretty-print-path-suffix/foo.pp rename to src/test/run-make-fulldeps/pretty-print-path-suffix/foo.pp diff --git a/src/test/run-make/pretty-print-path-suffix/foo_method.pp b/src/test/run-make-fulldeps/pretty-print-path-suffix/foo_method.pp similarity index 100% rename from src/test/run-make/pretty-print-path-suffix/foo_method.pp rename to src/test/run-make-fulldeps/pretty-print-path-suffix/foo_method.pp diff --git a/src/test/run-make/pretty-print-path-suffix/input.rs b/src/test/run-make-fulldeps/pretty-print-path-suffix/input.rs similarity index 100% rename from src/test/run-make/pretty-print-path-suffix/input.rs rename to src/test/run-make-fulldeps/pretty-print-path-suffix/input.rs diff --git a/src/test/run-make/pretty-print-path-suffix/nest_foo.pp b/src/test/run-make-fulldeps/pretty-print-path-suffix/nest_foo.pp similarity index 100% rename from src/test/run-make/pretty-print-path-suffix/nest_foo.pp rename to src/test/run-make-fulldeps/pretty-print-path-suffix/nest_foo.pp diff --git a/src/test/run-make/pretty-print-to-file/Makefile b/src/test/run-make-fulldeps/pretty-print-to-file/Makefile similarity index 100% rename from src/test/run-make/pretty-print-to-file/Makefile rename to src/test/run-make-fulldeps/pretty-print-to-file/Makefile diff --git a/src/test/run-make/pretty-print-to-file/input.pp b/src/test/run-make-fulldeps/pretty-print-to-file/input.pp similarity index 100% rename from src/test/run-make/pretty-print-to-file/input.pp rename to src/test/run-make-fulldeps/pretty-print-to-file/input.pp diff --git a/src/test/run-make/pretty-print-to-file/input.rs b/src/test/run-make-fulldeps/pretty-print-to-file/input.rs similarity index 100% rename from src/test/run-make/pretty-print-to-file/input.rs rename to src/test/run-make-fulldeps/pretty-print-to-file/input.rs diff --git a/src/test/run-make/print-cfg/Makefile b/src/test/run-make-fulldeps/print-cfg/Makefile similarity index 100% rename from src/test/run-make/print-cfg/Makefile rename to src/test/run-make-fulldeps/print-cfg/Makefile diff --git a/src/test/run-make/print-target-list/Makefile b/src/test/run-make-fulldeps/print-target-list/Makefile similarity index 100% rename from src/test/run-make/print-target-list/Makefile rename to src/test/run-make-fulldeps/print-target-list/Makefile diff --git a/src/test/run-make/profile/Makefile b/src/test/run-make-fulldeps/profile/Makefile similarity index 100% rename from src/test/run-make/profile/Makefile rename to src/test/run-make-fulldeps/profile/Makefile diff --git a/src/test/run-make/profile/test.rs b/src/test/run-make-fulldeps/profile/test.rs similarity index 100% rename from src/test/run-make/profile/test.rs rename to src/test/run-make-fulldeps/profile/test.rs diff --git a/src/test/run-make/prune-link-args/Makefile b/src/test/run-make-fulldeps/prune-link-args/Makefile similarity index 100% rename from src/test/run-make/prune-link-args/Makefile rename to src/test/run-make-fulldeps/prune-link-args/Makefile diff --git a/src/test/run-make/prune-link-args/empty.rs b/src/test/run-make-fulldeps/prune-link-args/empty.rs similarity index 100% rename from src/test/run-make/prune-link-args/empty.rs rename to src/test/run-make-fulldeps/prune-link-args/empty.rs diff --git a/src/test/run-make/relocation-model/Makefile b/src/test/run-make-fulldeps/relocation-model/Makefile similarity index 100% rename from src/test/run-make/relocation-model/Makefile rename to src/test/run-make-fulldeps/relocation-model/Makefile diff --git a/src/test/run-make/relocation-model/foo.rs b/src/test/run-make-fulldeps/relocation-model/foo.rs similarity index 100% rename from src/test/run-make/relocation-model/foo.rs rename to src/test/run-make-fulldeps/relocation-model/foo.rs diff --git a/src/test/run-make/relro-levels/Makefile b/src/test/run-make-fulldeps/relro-levels/Makefile similarity index 100% rename from src/test/run-make/relro-levels/Makefile rename to src/test/run-make-fulldeps/relro-levels/Makefile diff --git a/src/test/run-make/relro-levels/hello.rs b/src/test/run-make-fulldeps/relro-levels/hello.rs similarity index 100% rename from src/test/run-make/relro-levels/hello.rs rename to src/test/run-make-fulldeps/relro-levels/hello.rs diff --git a/src/test/run-make/reproducible-build/Makefile b/src/test/run-make-fulldeps/reproducible-build/Makefile similarity index 100% rename from src/test/run-make/reproducible-build/Makefile rename to src/test/run-make-fulldeps/reproducible-build/Makefile diff --git a/src/test/run-make/reproducible-build/linker.rs b/src/test/run-make-fulldeps/reproducible-build/linker.rs similarity index 100% rename from src/test/run-make/reproducible-build/linker.rs rename to src/test/run-make-fulldeps/reproducible-build/linker.rs diff --git a/src/test/run-make/reproducible-build/reproducible-build-aux.rs b/src/test/run-make-fulldeps/reproducible-build/reproducible-build-aux.rs similarity index 100% rename from src/test/run-make/reproducible-build/reproducible-build-aux.rs rename to src/test/run-make-fulldeps/reproducible-build/reproducible-build-aux.rs diff --git a/src/test/run-make/reproducible-build/reproducible-build.rs b/src/test/run-make-fulldeps/reproducible-build/reproducible-build.rs similarity index 100% rename from src/test/run-make/reproducible-build/reproducible-build.rs rename to src/test/run-make-fulldeps/reproducible-build/reproducible-build.rs diff --git a/src/test/run-make/rlib-chain/Makefile b/src/test/run-make-fulldeps/rlib-chain/Makefile similarity index 100% rename from src/test/run-make/rlib-chain/Makefile rename to src/test/run-make-fulldeps/rlib-chain/Makefile diff --git a/src/test/run-make/rlib-chain/m1.rs b/src/test/run-make-fulldeps/rlib-chain/m1.rs similarity index 100% rename from src/test/run-make/rlib-chain/m1.rs rename to src/test/run-make-fulldeps/rlib-chain/m1.rs diff --git a/src/test/run-make/rlib-chain/m2.rs b/src/test/run-make-fulldeps/rlib-chain/m2.rs similarity index 100% rename from src/test/run-make/rlib-chain/m2.rs rename to src/test/run-make-fulldeps/rlib-chain/m2.rs diff --git a/src/test/run-make/rlib-chain/m3.rs b/src/test/run-make-fulldeps/rlib-chain/m3.rs similarity index 100% rename from src/test/run-make/rlib-chain/m3.rs rename to src/test/run-make-fulldeps/rlib-chain/m3.rs diff --git a/src/test/run-make/rlib-chain/m4.rs b/src/test/run-make-fulldeps/rlib-chain/m4.rs similarity index 100% rename from src/test/run-make/rlib-chain/m4.rs rename to src/test/run-make-fulldeps/rlib-chain/m4.rs diff --git a/src/test/run-make/rustc-macro-dep-files/Makefile b/src/test/run-make-fulldeps/rustc-macro-dep-files/Makefile similarity index 100% rename from src/test/run-make/rustc-macro-dep-files/Makefile rename to src/test/run-make-fulldeps/rustc-macro-dep-files/Makefile diff --git a/src/test/run-make/rustc-macro-dep-files/bar.rs b/src/test/run-make-fulldeps/rustc-macro-dep-files/bar.rs similarity index 100% rename from src/test/run-make/rustc-macro-dep-files/bar.rs rename to src/test/run-make-fulldeps/rustc-macro-dep-files/bar.rs diff --git a/src/test/run-make/rustc-macro-dep-files/foo.rs b/src/test/run-make-fulldeps/rustc-macro-dep-files/foo.rs similarity index 100% rename from src/test/run-make/rustc-macro-dep-files/foo.rs rename to src/test/run-make-fulldeps/rustc-macro-dep-files/foo.rs diff --git a/src/test/run-make/rustdoc-error-lines/Makefile b/src/test/run-make-fulldeps/rustdoc-error-lines/Makefile similarity index 100% rename from src/test/run-make/rustdoc-error-lines/Makefile rename to src/test/run-make-fulldeps/rustdoc-error-lines/Makefile diff --git a/src/test/run-make/rustdoc-error-lines/input.rs b/src/test/run-make-fulldeps/rustdoc-error-lines/input.rs similarity index 100% rename from src/test/run-make/rustdoc-error-lines/input.rs rename to src/test/run-make-fulldeps/rustdoc-error-lines/input.rs diff --git a/src/test/run-make/rustdoc-output-path/Makefile b/src/test/run-make-fulldeps/rustdoc-output-path/Makefile similarity index 100% rename from src/test/run-make/rustdoc-output-path/Makefile rename to src/test/run-make-fulldeps/rustdoc-output-path/Makefile diff --git a/src/test/run-make/rustdoc-output-path/foo.rs b/src/test/run-make-fulldeps/rustdoc-output-path/foo.rs similarity index 100% rename from src/test/run-make/rustdoc-output-path/foo.rs rename to src/test/run-make-fulldeps/rustdoc-output-path/foo.rs diff --git a/src/test/run-make/sanitizer-address/Makefile b/src/test/run-make-fulldeps/sanitizer-address/Makefile similarity index 100% rename from src/test/run-make/sanitizer-address/Makefile rename to src/test/run-make-fulldeps/sanitizer-address/Makefile diff --git a/src/test/run-make/sanitizer-address/overflow.rs b/src/test/run-make-fulldeps/sanitizer-address/overflow.rs similarity index 100% rename from src/test/run-make/sanitizer-address/overflow.rs rename to src/test/run-make-fulldeps/sanitizer-address/overflow.rs diff --git a/src/test/run-make/sanitizer-cdylib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile similarity index 100% rename from src/test/run-make/sanitizer-cdylib-link/Makefile rename to src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile diff --git a/src/test/run-make/sanitizer-cdylib-link/library.rs b/src/test/run-make-fulldeps/sanitizer-cdylib-link/library.rs similarity index 100% rename from src/test/run-make/sanitizer-cdylib-link/library.rs rename to src/test/run-make-fulldeps/sanitizer-cdylib-link/library.rs diff --git a/src/test/run-make/sanitizer-cdylib-link/program.rs b/src/test/run-make-fulldeps/sanitizer-cdylib-link/program.rs similarity index 100% rename from src/test/run-make/sanitizer-cdylib-link/program.rs rename to src/test/run-make-fulldeps/sanitizer-cdylib-link/program.rs diff --git a/src/test/run-make/sanitizer-dylib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile similarity index 100% rename from src/test/run-make/sanitizer-dylib-link/Makefile rename to src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile diff --git a/src/test/run-make/sanitizer-dylib-link/library.rs b/src/test/run-make-fulldeps/sanitizer-dylib-link/library.rs similarity index 100% rename from src/test/run-make/sanitizer-dylib-link/library.rs rename to src/test/run-make-fulldeps/sanitizer-dylib-link/library.rs diff --git a/src/test/run-make/sanitizer-dylib-link/program.rs b/src/test/run-make-fulldeps/sanitizer-dylib-link/program.rs similarity index 100% rename from src/test/run-make/sanitizer-dylib-link/program.rs rename to src/test/run-make-fulldeps/sanitizer-dylib-link/program.rs diff --git a/src/test/run-make/sanitizer-invalid-cratetype/Makefile b/src/test/run-make-fulldeps/sanitizer-invalid-cratetype/Makefile similarity index 100% rename from src/test/run-make/sanitizer-invalid-cratetype/Makefile rename to src/test/run-make-fulldeps/sanitizer-invalid-cratetype/Makefile diff --git a/src/test/run-make/sanitizer-invalid-cratetype/hello.rs b/src/test/run-make-fulldeps/sanitizer-invalid-cratetype/hello.rs similarity index 100% rename from src/test/run-make/sanitizer-invalid-cratetype/hello.rs rename to src/test/run-make-fulldeps/sanitizer-invalid-cratetype/hello.rs diff --git a/src/test/run-make/sanitizer-invalid-target/Makefile b/src/test/run-make-fulldeps/sanitizer-invalid-target/Makefile similarity index 100% rename from src/test/run-make/sanitizer-invalid-target/Makefile rename to src/test/run-make-fulldeps/sanitizer-invalid-target/Makefile diff --git a/src/test/run-make/sanitizer-invalid-target/hello.rs b/src/test/run-make-fulldeps/sanitizer-invalid-target/hello.rs similarity index 100% rename from src/test/run-make/sanitizer-invalid-target/hello.rs rename to src/test/run-make-fulldeps/sanitizer-invalid-target/hello.rs diff --git a/src/test/run-make/sanitizer-leak/Makefile b/src/test/run-make-fulldeps/sanitizer-leak/Makefile similarity index 100% rename from src/test/run-make/sanitizer-leak/Makefile rename to src/test/run-make-fulldeps/sanitizer-leak/Makefile diff --git a/src/test/run-make/sanitizer-leak/leak.rs b/src/test/run-make-fulldeps/sanitizer-leak/leak.rs similarity index 100% rename from src/test/run-make/sanitizer-leak/leak.rs rename to src/test/run-make-fulldeps/sanitizer-leak/leak.rs diff --git a/src/test/run-make/sanitizer-memory/Makefile b/src/test/run-make-fulldeps/sanitizer-memory/Makefile similarity index 100% rename from src/test/run-make/sanitizer-memory/Makefile rename to src/test/run-make-fulldeps/sanitizer-memory/Makefile diff --git a/src/test/run-make/sanitizer-memory/uninit.rs b/src/test/run-make-fulldeps/sanitizer-memory/uninit.rs similarity index 100% rename from src/test/run-make/sanitizer-memory/uninit.rs rename to src/test/run-make-fulldeps/sanitizer-memory/uninit.rs diff --git a/src/test/run-make/sanitizer-staticlib-link/Makefile b/src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile similarity index 100% rename from src/test/run-make/sanitizer-staticlib-link/Makefile rename to src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile diff --git a/src/test/run-make/sanitizer-staticlib-link/library.rs b/src/test/run-make-fulldeps/sanitizer-staticlib-link/library.rs similarity index 100% rename from src/test/run-make/sanitizer-staticlib-link/library.rs rename to src/test/run-make-fulldeps/sanitizer-staticlib-link/library.rs diff --git a/src/test/run-make/sanitizer-staticlib-link/program.c b/src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c similarity index 100% rename from src/test/run-make/sanitizer-staticlib-link/program.c rename to src/test/run-make-fulldeps/sanitizer-staticlib-link/program.c diff --git a/src/test/run-make/save-analysis-fail/Makefile b/src/test/run-make-fulldeps/save-analysis-fail/Makefile similarity index 100% rename from src/test/run-make/save-analysis-fail/Makefile rename to src/test/run-make-fulldeps/save-analysis-fail/Makefile diff --git a/src/test/run-make/save-analysis-fail/SameDir.rs b/src/test/run-make-fulldeps/save-analysis-fail/SameDir.rs similarity index 100% rename from src/test/run-make/save-analysis-fail/SameDir.rs rename to src/test/run-make-fulldeps/save-analysis-fail/SameDir.rs diff --git a/src/test/run-make/save-analysis-fail/SameDir3.rs b/src/test/run-make-fulldeps/save-analysis-fail/SameDir3.rs similarity index 100% rename from src/test/run-make/save-analysis-fail/SameDir3.rs rename to src/test/run-make-fulldeps/save-analysis-fail/SameDir3.rs diff --git a/src/test/run-make/save-analysis-fail/SubDir/mod.rs b/src/test/run-make-fulldeps/save-analysis-fail/SubDir/mod.rs similarity index 100% rename from src/test/run-make/save-analysis-fail/SubDir/mod.rs rename to src/test/run-make-fulldeps/save-analysis-fail/SubDir/mod.rs diff --git a/src/test/run-make/save-analysis-fail/foo.rs b/src/test/run-make-fulldeps/save-analysis-fail/foo.rs similarity index 100% rename from src/test/run-make/save-analysis-fail/foo.rs rename to src/test/run-make-fulldeps/save-analysis-fail/foo.rs diff --git a/src/test/run-make/save-analysis-fail/krate2.rs b/src/test/run-make-fulldeps/save-analysis-fail/krate2.rs similarity index 100% rename from src/test/run-make/save-analysis-fail/krate2.rs rename to src/test/run-make-fulldeps/save-analysis-fail/krate2.rs diff --git a/src/test/run-make/save-analysis/Makefile b/src/test/run-make-fulldeps/save-analysis/Makefile similarity index 100% rename from src/test/run-make/save-analysis/Makefile rename to src/test/run-make-fulldeps/save-analysis/Makefile diff --git a/src/test/run-make/save-analysis/SameDir.rs b/src/test/run-make-fulldeps/save-analysis/SameDir.rs similarity index 100% rename from src/test/run-make/save-analysis/SameDir.rs rename to src/test/run-make-fulldeps/save-analysis/SameDir.rs diff --git a/src/test/run-make/save-analysis/SameDir3.rs b/src/test/run-make-fulldeps/save-analysis/SameDir3.rs similarity index 100% rename from src/test/run-make/save-analysis/SameDir3.rs rename to src/test/run-make-fulldeps/save-analysis/SameDir3.rs diff --git a/src/test/run-make/save-analysis/SubDir/mod.rs b/src/test/run-make-fulldeps/save-analysis/SubDir/mod.rs similarity index 100% rename from src/test/run-make/save-analysis/SubDir/mod.rs rename to src/test/run-make-fulldeps/save-analysis/SubDir/mod.rs diff --git a/src/test/run-make/save-analysis/extra-docs.md b/src/test/run-make-fulldeps/save-analysis/extra-docs.md similarity index 100% rename from src/test/run-make/save-analysis/extra-docs.md rename to src/test/run-make-fulldeps/save-analysis/extra-docs.md diff --git a/src/test/run-make/save-analysis/foo.rs b/src/test/run-make-fulldeps/save-analysis/foo.rs similarity index 100% rename from src/test/run-make/save-analysis/foo.rs rename to src/test/run-make-fulldeps/save-analysis/foo.rs diff --git a/src/test/run-make/save-analysis/krate2.rs b/src/test/run-make-fulldeps/save-analysis/krate2.rs similarity index 100% rename from src/test/run-make/save-analysis/krate2.rs rename to src/test/run-make-fulldeps/save-analysis/krate2.rs diff --git a/src/test/run-make/sepcomp-cci-copies/Makefile b/src/test/run-make-fulldeps/sepcomp-cci-copies/Makefile similarity index 100% rename from src/test/run-make/sepcomp-cci-copies/Makefile rename to src/test/run-make-fulldeps/sepcomp-cci-copies/Makefile diff --git a/src/test/run-make/sepcomp-cci-copies/cci_lib.rs b/src/test/run-make-fulldeps/sepcomp-cci-copies/cci_lib.rs similarity index 100% rename from src/test/run-make/sepcomp-cci-copies/cci_lib.rs rename to src/test/run-make-fulldeps/sepcomp-cci-copies/cci_lib.rs diff --git a/src/test/run-make/sepcomp-cci-copies/foo.rs b/src/test/run-make-fulldeps/sepcomp-cci-copies/foo.rs similarity index 100% rename from src/test/run-make/sepcomp-cci-copies/foo.rs rename to src/test/run-make-fulldeps/sepcomp-cci-copies/foo.rs diff --git a/src/test/run-make/sepcomp-inlining/Makefile b/src/test/run-make-fulldeps/sepcomp-inlining/Makefile similarity index 100% rename from src/test/run-make/sepcomp-inlining/Makefile rename to src/test/run-make-fulldeps/sepcomp-inlining/Makefile diff --git a/src/test/run-make/sepcomp-inlining/foo.rs b/src/test/run-make-fulldeps/sepcomp-inlining/foo.rs similarity index 100% rename from src/test/run-make/sepcomp-inlining/foo.rs rename to src/test/run-make-fulldeps/sepcomp-inlining/foo.rs diff --git a/src/test/run-make/sepcomp-separate/Makefile b/src/test/run-make-fulldeps/sepcomp-separate/Makefile similarity index 100% rename from src/test/run-make/sepcomp-separate/Makefile rename to src/test/run-make-fulldeps/sepcomp-separate/Makefile diff --git a/src/test/run-make/sepcomp-separate/foo.rs b/src/test/run-make-fulldeps/sepcomp-separate/foo.rs similarity index 100% rename from src/test/run-make/sepcomp-separate/foo.rs rename to src/test/run-make-fulldeps/sepcomp-separate/foo.rs diff --git a/src/test/run-make/simd-ffi/Makefile b/src/test/run-make-fulldeps/simd-ffi/Makefile similarity index 100% rename from src/test/run-make/simd-ffi/Makefile rename to src/test/run-make-fulldeps/simd-ffi/Makefile diff --git a/src/test/run-make/simd-ffi/simd.rs b/src/test/run-make-fulldeps/simd-ffi/simd.rs similarity index 100% rename from src/test/run-make/simd-ffi/simd.rs rename to src/test/run-make-fulldeps/simd-ffi/simd.rs diff --git a/src/test/run-make/simple-dylib/Makefile b/src/test/run-make-fulldeps/simple-dylib/Makefile similarity index 100% rename from src/test/run-make/simple-dylib/Makefile rename to src/test/run-make-fulldeps/simple-dylib/Makefile diff --git a/src/test/run-make/simple-dylib/bar.rs b/src/test/run-make-fulldeps/simple-dylib/bar.rs similarity index 100% rename from src/test/run-make/simple-dylib/bar.rs rename to src/test/run-make-fulldeps/simple-dylib/bar.rs diff --git a/src/test/run-make/simple-dylib/foo.rs b/src/test/run-make-fulldeps/simple-dylib/foo.rs similarity index 100% rename from src/test/run-make/simple-dylib/foo.rs rename to src/test/run-make-fulldeps/simple-dylib/foo.rs diff --git a/src/test/run-make/simple-rlib/Makefile b/src/test/run-make-fulldeps/simple-rlib/Makefile similarity index 100% rename from src/test/run-make/simple-rlib/Makefile rename to src/test/run-make-fulldeps/simple-rlib/Makefile diff --git a/src/test/run-make/simple-rlib/bar.rs b/src/test/run-make-fulldeps/simple-rlib/bar.rs similarity index 100% rename from src/test/run-make/simple-rlib/bar.rs rename to src/test/run-make-fulldeps/simple-rlib/bar.rs diff --git a/src/test/run-make/simple-rlib/foo.rs b/src/test/run-make-fulldeps/simple-rlib/foo.rs similarity index 100% rename from src/test/run-make/simple-rlib/foo.rs rename to src/test/run-make-fulldeps/simple-rlib/foo.rs diff --git a/src/test/run-make/stable-symbol-names/Makefile b/src/test/run-make-fulldeps/stable-symbol-names/Makefile similarity index 100% rename from src/test/run-make/stable-symbol-names/Makefile rename to src/test/run-make-fulldeps/stable-symbol-names/Makefile diff --git a/src/test/run-make/stable-symbol-names/stable-symbol-names1.rs b/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names1.rs similarity index 100% rename from src/test/run-make/stable-symbol-names/stable-symbol-names1.rs rename to src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names1.rs diff --git a/src/test/run-make/stable-symbol-names/stable-symbol-names2.rs b/src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs similarity index 100% rename from src/test/run-make/stable-symbol-names/stable-symbol-names2.rs rename to src/test/run-make-fulldeps/stable-symbol-names/stable-symbol-names2.rs diff --git a/src/test/run-make/static-dylib-by-default/Makefile b/src/test/run-make-fulldeps/static-dylib-by-default/Makefile similarity index 100% rename from src/test/run-make/static-dylib-by-default/Makefile rename to src/test/run-make-fulldeps/static-dylib-by-default/Makefile diff --git a/src/test/run-make/static-dylib-by-default/bar.rs b/src/test/run-make-fulldeps/static-dylib-by-default/bar.rs similarity index 100% rename from src/test/run-make/static-dylib-by-default/bar.rs rename to src/test/run-make-fulldeps/static-dylib-by-default/bar.rs diff --git a/src/test/run-make/static-dylib-by-default/foo.rs b/src/test/run-make-fulldeps/static-dylib-by-default/foo.rs similarity index 100% rename from src/test/run-make/static-dylib-by-default/foo.rs rename to src/test/run-make-fulldeps/static-dylib-by-default/foo.rs diff --git a/src/test/run-make/static-dylib-by-default/main.c b/src/test/run-make-fulldeps/static-dylib-by-default/main.c similarity index 100% rename from src/test/run-make/static-dylib-by-default/main.c rename to src/test/run-make-fulldeps/static-dylib-by-default/main.c diff --git a/src/test/run-make/static-nobundle/Makefile b/src/test/run-make-fulldeps/static-nobundle/Makefile similarity index 100% rename from src/test/run-make/static-nobundle/Makefile rename to src/test/run-make-fulldeps/static-nobundle/Makefile diff --git a/src/test/run-make/static-nobundle/aaa.c b/src/test/run-make-fulldeps/static-nobundle/aaa.c similarity index 100% rename from src/test/run-make/static-nobundle/aaa.c rename to src/test/run-make-fulldeps/static-nobundle/aaa.c diff --git a/src/test/run-make/static-nobundle/bbb.rs b/src/test/run-make-fulldeps/static-nobundle/bbb.rs similarity index 100% rename from src/test/run-make/static-nobundle/bbb.rs rename to src/test/run-make-fulldeps/static-nobundle/bbb.rs diff --git a/src/test/run-make/static-nobundle/ccc.rs b/src/test/run-make-fulldeps/static-nobundle/ccc.rs similarity index 100% rename from src/test/run-make/static-nobundle/ccc.rs rename to src/test/run-make-fulldeps/static-nobundle/ccc.rs diff --git a/src/test/run-make/static-nobundle/ddd.rs b/src/test/run-make-fulldeps/static-nobundle/ddd.rs similarity index 100% rename from src/test/run-make/static-nobundle/ddd.rs rename to src/test/run-make-fulldeps/static-nobundle/ddd.rs diff --git a/src/test/run-make/static-unwinding/Makefile b/src/test/run-make-fulldeps/static-unwinding/Makefile similarity index 100% rename from src/test/run-make/static-unwinding/Makefile rename to src/test/run-make-fulldeps/static-unwinding/Makefile diff --git a/src/test/run-make/static-unwinding/lib.rs b/src/test/run-make-fulldeps/static-unwinding/lib.rs similarity index 100% rename from src/test/run-make/static-unwinding/lib.rs rename to src/test/run-make-fulldeps/static-unwinding/lib.rs diff --git a/src/test/run-make/static-unwinding/main.rs b/src/test/run-make-fulldeps/static-unwinding/main.rs similarity index 100% rename from src/test/run-make/static-unwinding/main.rs rename to src/test/run-make-fulldeps/static-unwinding/main.rs diff --git a/src/test/run-make/staticlib-blank-lib/Makefile b/src/test/run-make-fulldeps/staticlib-blank-lib/Makefile similarity index 100% rename from src/test/run-make/staticlib-blank-lib/Makefile rename to src/test/run-make-fulldeps/staticlib-blank-lib/Makefile diff --git a/src/test/run-make/staticlib-blank-lib/foo.rs b/src/test/run-make-fulldeps/staticlib-blank-lib/foo.rs similarity index 100% rename from src/test/run-make/staticlib-blank-lib/foo.rs rename to src/test/run-make-fulldeps/staticlib-blank-lib/foo.rs diff --git a/src/test/run-make/stdin-non-utf8/Makefile b/src/test/run-make-fulldeps/stdin-non-utf8/Makefile similarity index 100% rename from src/test/run-make/stdin-non-utf8/Makefile rename to src/test/run-make-fulldeps/stdin-non-utf8/Makefile diff --git a/src/test/run-make/stdin-non-utf8/non-utf8 b/src/test/run-make-fulldeps/stdin-non-utf8/non-utf8 similarity index 100% rename from src/test/run-make/stdin-non-utf8/non-utf8 rename to src/test/run-make-fulldeps/stdin-non-utf8/non-utf8 diff --git a/src/test/run-make/suspicious-library/Makefile b/src/test/run-make-fulldeps/suspicious-library/Makefile similarity index 100% rename from src/test/run-make/suspicious-library/Makefile rename to src/test/run-make-fulldeps/suspicious-library/Makefile diff --git a/src/test/run-make/suspicious-library/bar.rs b/src/test/run-make-fulldeps/suspicious-library/bar.rs similarity index 100% rename from src/test/run-make/suspicious-library/bar.rs rename to src/test/run-make-fulldeps/suspicious-library/bar.rs diff --git a/src/test/run-make/suspicious-library/foo.rs b/src/test/run-make-fulldeps/suspicious-library/foo.rs similarity index 100% rename from src/test/run-make/suspicious-library/foo.rs rename to src/test/run-make-fulldeps/suspicious-library/foo.rs diff --git a/src/test/run-make/symbol-visibility/Makefile b/src/test/run-make-fulldeps/symbol-visibility/Makefile similarity index 100% rename from src/test/run-make/symbol-visibility/Makefile rename to src/test/run-make-fulldeps/symbol-visibility/Makefile diff --git a/src/test/run-make/symbol-visibility/a_cdylib.rs b/src/test/run-make-fulldeps/symbol-visibility/a_cdylib.rs similarity index 100% rename from src/test/run-make/symbol-visibility/a_cdylib.rs rename to src/test/run-make-fulldeps/symbol-visibility/a_cdylib.rs diff --git a/src/test/run-make/symbol-visibility/a_rust_dylib.rs b/src/test/run-make-fulldeps/symbol-visibility/a_rust_dylib.rs similarity index 100% rename from src/test/run-make/symbol-visibility/a_rust_dylib.rs rename to src/test/run-make-fulldeps/symbol-visibility/a_rust_dylib.rs diff --git a/src/test/run-make/symbol-visibility/an_executable.rs b/src/test/run-make-fulldeps/symbol-visibility/an_executable.rs similarity index 100% rename from src/test/run-make/symbol-visibility/an_executable.rs rename to src/test/run-make-fulldeps/symbol-visibility/an_executable.rs diff --git a/src/test/run-make/symbol-visibility/an_rlib.rs b/src/test/run-make-fulldeps/symbol-visibility/an_rlib.rs similarity index 100% rename from src/test/run-make/symbol-visibility/an_rlib.rs rename to src/test/run-make-fulldeps/symbol-visibility/an_rlib.rs diff --git a/src/test/run-make/symbols-are-reasonable/Makefile b/src/test/run-make-fulldeps/symbols-are-reasonable/Makefile similarity index 100% rename from src/test/run-make/symbols-are-reasonable/Makefile rename to src/test/run-make-fulldeps/symbols-are-reasonable/Makefile diff --git a/src/test/run-make/symbols-are-reasonable/lib.rs b/src/test/run-make-fulldeps/symbols-are-reasonable/lib.rs similarity index 100% rename from src/test/run-make/symbols-are-reasonable/lib.rs rename to src/test/run-make-fulldeps/symbols-are-reasonable/lib.rs diff --git a/src/test/run-make/symbols-include-type-name/Makefile b/src/test/run-make-fulldeps/symbols-include-type-name/Makefile similarity index 100% rename from src/test/run-make/symbols-include-type-name/Makefile rename to src/test/run-make-fulldeps/symbols-include-type-name/Makefile diff --git a/src/test/run-make/symbols-include-type-name/lib.rs b/src/test/run-make-fulldeps/symbols-include-type-name/lib.rs similarity index 100% rename from src/test/run-make/symbols-include-type-name/lib.rs rename to src/test/run-make-fulldeps/symbols-include-type-name/lib.rs diff --git a/src/test/run-make/symlinked-extern/Makefile b/src/test/run-make-fulldeps/symlinked-extern/Makefile similarity index 100% rename from src/test/run-make/symlinked-extern/Makefile rename to src/test/run-make-fulldeps/symlinked-extern/Makefile diff --git a/src/test/run-make/symlinked-extern/bar.rs b/src/test/run-make-fulldeps/symlinked-extern/bar.rs similarity index 100% rename from src/test/run-make/symlinked-extern/bar.rs rename to src/test/run-make-fulldeps/symlinked-extern/bar.rs diff --git a/src/test/run-make/symlinked-extern/baz.rs b/src/test/run-make-fulldeps/symlinked-extern/baz.rs similarity index 100% rename from src/test/run-make/symlinked-extern/baz.rs rename to src/test/run-make-fulldeps/symlinked-extern/baz.rs diff --git a/src/test/run-make/symlinked-extern/foo.rs b/src/test/run-make-fulldeps/symlinked-extern/foo.rs similarity index 100% rename from src/test/run-make/symlinked-extern/foo.rs rename to src/test/run-make-fulldeps/symlinked-extern/foo.rs diff --git a/src/test/run-make/symlinked-libraries/Makefile b/src/test/run-make-fulldeps/symlinked-libraries/Makefile similarity index 100% rename from src/test/run-make/symlinked-libraries/Makefile rename to src/test/run-make-fulldeps/symlinked-libraries/Makefile diff --git a/src/test/run-make/symlinked-libraries/bar.rs b/src/test/run-make-fulldeps/symlinked-libraries/bar.rs similarity index 100% rename from src/test/run-make/symlinked-libraries/bar.rs rename to src/test/run-make-fulldeps/symlinked-libraries/bar.rs diff --git a/src/test/run-make/symlinked-libraries/foo.rs b/src/test/run-make-fulldeps/symlinked-libraries/foo.rs similarity index 100% rename from src/test/run-make/symlinked-libraries/foo.rs rename to src/test/run-make-fulldeps/symlinked-libraries/foo.rs diff --git a/src/test/run-make/symlinked-rlib/Makefile b/src/test/run-make-fulldeps/symlinked-rlib/Makefile similarity index 100% rename from src/test/run-make/symlinked-rlib/Makefile rename to src/test/run-make-fulldeps/symlinked-rlib/Makefile diff --git a/src/test/run-make/symlinked-rlib/bar.rs b/src/test/run-make-fulldeps/symlinked-rlib/bar.rs similarity index 100% rename from src/test/run-make/symlinked-rlib/bar.rs rename to src/test/run-make-fulldeps/symlinked-rlib/bar.rs diff --git a/src/test/run-make/symlinked-rlib/foo.rs b/src/test/run-make-fulldeps/symlinked-rlib/foo.rs similarity index 100% rename from src/test/run-make/symlinked-rlib/foo.rs rename to src/test/run-make-fulldeps/symlinked-rlib/foo.rs diff --git a/src/test/run-make/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile similarity index 100% rename from src/test/run-make/sysroot-crates-are-unstable/Makefile rename to src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile diff --git a/src/test/run-make/sysroot-crates-are-unstable/test.py b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py similarity index 100% rename from src/test/run-make/sysroot-crates-are-unstable/test.py rename to src/test/run-make-fulldeps/sysroot-crates-are-unstable/test.py diff --git a/src/test/run-make/target-cpu-native/Makefile b/src/test/run-make-fulldeps/target-cpu-native/Makefile similarity index 100% rename from src/test/run-make/target-cpu-native/Makefile rename to src/test/run-make-fulldeps/target-cpu-native/Makefile diff --git a/src/test/run-make/target-cpu-native/foo.rs b/src/test/run-make-fulldeps/target-cpu-native/foo.rs similarity index 100% rename from src/test/run-make/target-cpu-native/foo.rs rename to src/test/run-make-fulldeps/target-cpu-native/foo.rs diff --git a/src/test/run-make/target-specs/Makefile b/src/test/run-make-fulldeps/target-specs/Makefile similarity index 100% rename from src/test/run-make/target-specs/Makefile rename to src/test/run-make-fulldeps/target-specs/Makefile diff --git a/src/test/run-make/target-specs/foo.rs b/src/test/run-make-fulldeps/target-specs/foo.rs similarity index 100% rename from src/test/run-make/target-specs/foo.rs rename to src/test/run-make-fulldeps/target-specs/foo.rs diff --git a/src/test/run-make/target-specs/my-awesome-platform.json b/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json similarity index 100% rename from src/test/run-make/target-specs/my-awesome-platform.json rename to src/test/run-make-fulldeps/target-specs/my-awesome-platform.json diff --git a/src/test/run-make/target-specs/my-incomplete-platform.json b/src/test/run-make-fulldeps/target-specs/my-incomplete-platform.json similarity index 100% rename from src/test/run-make/target-specs/my-incomplete-platform.json rename to src/test/run-make-fulldeps/target-specs/my-incomplete-platform.json diff --git a/src/test/run-make/target-specs/my-invalid-platform.json b/src/test/run-make-fulldeps/target-specs/my-invalid-platform.json similarity index 100% rename from src/test/run-make/target-specs/my-invalid-platform.json rename to src/test/run-make-fulldeps/target-specs/my-invalid-platform.json diff --git a/src/test/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json b/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json similarity index 100% rename from src/test/run-make/target-specs/my-x86_64-unknown-linux-gnu-platform.json rename to src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json diff --git a/src/test/run-make/target-without-atomics/Makefile b/src/test/run-make-fulldeps/target-without-atomics/Makefile similarity index 100% rename from src/test/run-make/target-without-atomics/Makefile rename to src/test/run-make-fulldeps/target-without-atomics/Makefile diff --git a/src/test/run-make/test-harness/Makefile b/src/test/run-make-fulldeps/test-harness/Makefile similarity index 100% rename from src/test/run-make/test-harness/Makefile rename to src/test/run-make-fulldeps/test-harness/Makefile diff --git a/src/test/run-make/test-harness/test-ignore-cfg.rs b/src/test/run-make-fulldeps/test-harness/test-ignore-cfg.rs similarity index 100% rename from src/test/run-make/test-harness/test-ignore-cfg.rs rename to src/test/run-make-fulldeps/test-harness/test-ignore-cfg.rs diff --git a/src/test/run-make/tools.mk b/src/test/run-make-fulldeps/tools.mk similarity index 100% rename from src/test/run-make/tools.mk rename to src/test/run-make-fulldeps/tools.mk diff --git a/src/test/run-make/treat-err-as-bug/Makefile b/src/test/run-make-fulldeps/treat-err-as-bug/Makefile similarity index 100% rename from src/test/run-make/treat-err-as-bug/Makefile rename to src/test/run-make-fulldeps/treat-err-as-bug/Makefile diff --git a/src/test/run-make/treat-err-as-bug/err.rs b/src/test/run-make-fulldeps/treat-err-as-bug/err.rs similarity index 100% rename from src/test/run-make/treat-err-as-bug/err.rs rename to src/test/run-make-fulldeps/treat-err-as-bug/err.rs diff --git a/src/test/run-make/type-mismatch-same-crate-name/Makefile b/src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile similarity index 100% rename from src/test/run-make/type-mismatch-same-crate-name/Makefile rename to src/test/run-make-fulldeps/type-mismatch-same-crate-name/Makefile diff --git a/src/test/run-make/type-mismatch-same-crate-name/crateA.rs b/src/test/run-make-fulldeps/type-mismatch-same-crate-name/crateA.rs similarity index 100% rename from src/test/run-make/type-mismatch-same-crate-name/crateA.rs rename to src/test/run-make-fulldeps/type-mismatch-same-crate-name/crateA.rs diff --git a/src/test/run-make/type-mismatch-same-crate-name/crateB.rs b/src/test/run-make-fulldeps/type-mismatch-same-crate-name/crateB.rs similarity index 100% rename from src/test/run-make/type-mismatch-same-crate-name/crateB.rs rename to src/test/run-make-fulldeps/type-mismatch-same-crate-name/crateB.rs diff --git a/src/test/run-make/type-mismatch-same-crate-name/crateC.rs b/src/test/run-make-fulldeps/type-mismatch-same-crate-name/crateC.rs similarity index 100% rename from src/test/run-make/type-mismatch-same-crate-name/crateC.rs rename to src/test/run-make-fulldeps/type-mismatch-same-crate-name/crateC.rs diff --git a/src/test/run-make/use-extern-for-plugins/Makefile b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile similarity index 100% rename from src/test/run-make/use-extern-for-plugins/Makefile rename to src/test/run-make-fulldeps/use-extern-for-plugins/Makefile diff --git a/src/test/run-make/use-extern-for-plugins/bar.rs b/src/test/run-make-fulldeps/use-extern-for-plugins/bar.rs similarity index 100% rename from src/test/run-make/use-extern-for-plugins/bar.rs rename to src/test/run-make-fulldeps/use-extern-for-plugins/bar.rs diff --git a/src/test/run-make/use-extern-for-plugins/baz.rs b/src/test/run-make-fulldeps/use-extern-for-plugins/baz.rs similarity index 100% rename from src/test/run-make/use-extern-for-plugins/baz.rs rename to src/test/run-make-fulldeps/use-extern-for-plugins/baz.rs diff --git a/src/test/run-make/use-extern-for-plugins/foo.rs b/src/test/run-make-fulldeps/use-extern-for-plugins/foo.rs similarity index 100% rename from src/test/run-make/use-extern-for-plugins/foo.rs rename to src/test/run-make-fulldeps/use-extern-for-plugins/foo.rs diff --git a/src/test/run-make/used/Makefile b/src/test/run-make-fulldeps/used/Makefile similarity index 100% rename from src/test/run-make/used/Makefile rename to src/test/run-make-fulldeps/used/Makefile diff --git a/src/test/run-make/used/used.rs b/src/test/run-make-fulldeps/used/used.rs similarity index 100% rename from src/test/run-make/used/used.rs rename to src/test/run-make-fulldeps/used/used.rs diff --git a/src/test/run-make/version/Makefile b/src/test/run-make-fulldeps/version/Makefile similarity index 100% rename from src/test/run-make/version/Makefile rename to src/test/run-make-fulldeps/version/Makefile diff --git a/src/test/run-make/volatile-intrinsics/Makefile b/src/test/run-make-fulldeps/volatile-intrinsics/Makefile similarity index 100% rename from src/test/run-make/volatile-intrinsics/Makefile rename to src/test/run-make-fulldeps/volatile-intrinsics/Makefile diff --git a/src/test/run-make/volatile-intrinsics/main.rs b/src/test/run-make-fulldeps/volatile-intrinsics/main.rs similarity index 100% rename from src/test/run-make/volatile-intrinsics/main.rs rename to src/test/run-make-fulldeps/volatile-intrinsics/main.rs diff --git a/src/test/run-make/weird-output-filenames/Makefile b/src/test/run-make-fulldeps/weird-output-filenames/Makefile similarity index 100% rename from src/test/run-make/weird-output-filenames/Makefile rename to src/test/run-make-fulldeps/weird-output-filenames/Makefile diff --git a/src/test/run-make/weird-output-filenames/foo.rs b/src/test/run-make-fulldeps/weird-output-filenames/foo.rs similarity index 100% rename from src/test/run-make/weird-output-filenames/foo.rs rename to src/test/run-make-fulldeps/weird-output-filenames/foo.rs diff --git a/src/test/run-make/windows-spawn/Makefile b/src/test/run-make-fulldeps/windows-spawn/Makefile similarity index 100% rename from src/test/run-make/windows-spawn/Makefile rename to src/test/run-make-fulldeps/windows-spawn/Makefile diff --git a/src/test/run-make/windows-spawn/hello.rs b/src/test/run-make-fulldeps/windows-spawn/hello.rs similarity index 100% rename from src/test/run-make/windows-spawn/hello.rs rename to src/test/run-make-fulldeps/windows-spawn/hello.rs diff --git a/src/test/run-make/windows-spawn/spawn.rs b/src/test/run-make-fulldeps/windows-spawn/spawn.rs similarity index 100% rename from src/test/run-make/windows-spawn/spawn.rs rename to src/test/run-make-fulldeps/windows-spawn/spawn.rs diff --git a/src/test/run-make/windows-subsystem/Makefile b/src/test/run-make-fulldeps/windows-subsystem/Makefile similarity index 100% rename from src/test/run-make/windows-subsystem/Makefile rename to src/test/run-make-fulldeps/windows-subsystem/Makefile diff --git a/src/test/run-make/windows-subsystem/console.rs b/src/test/run-make-fulldeps/windows-subsystem/console.rs similarity index 100% rename from src/test/run-make/windows-subsystem/console.rs rename to src/test/run-make-fulldeps/windows-subsystem/console.rs diff --git a/src/test/run-make/windows-subsystem/windows.rs b/src/test/run-make-fulldeps/windows-subsystem/windows.rs similarity index 100% rename from src/test/run-make/windows-subsystem/windows.rs rename to src/test/run-make-fulldeps/windows-subsystem/windows.rs diff --git a/src/test/run-make/wasm-custom-section/Makefile b/src/test/run-make/wasm-custom-section/Makefile new file mode 100644 index 0000000000000..399951e516314 --- /dev/null +++ b/src/test/run-make/wasm-custom-section/Makefile @@ -0,0 +1,10 @@ +-include ../../run-make-fulldeps/tools.mk + +ifeq ($(TARGET),wasm32-unknown-unknown) +all: + $(RUSTC) foo.rs --target wasm32-unknown-unknown + $(RUSTC) bar.rs -C lto -O --target wasm32-unknown-unknown + $(NODE) foo.js $(TMPDIR)/bar.wasm +else +all: +endif diff --git a/src/test/run-make/wasm-custom-section/bar.rs b/src/test/run-make/wasm-custom-section/bar.rs new file mode 100644 index 0000000000000..e3db36d6dbd4c --- /dev/null +++ b/src/test/run-make/wasm-custom-section/bar.rs @@ -0,0 +1,24 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "cdylib"] +#![feature(wasm_custom_section)] +#![deny(warnings)] + +extern crate foo; + +#[wasm_custom_section = "foo"] +const A: [u8; 2] = [5, 6]; + +#[wasm_custom_section = "baz"] +const B: [u8; 2] = [7, 8]; + +#[no_mangle] +pub extern fn foo() {} diff --git a/src/test/run-make/wasm-custom-section/foo.js b/src/test/run-make/wasm-custom-section/foo.js new file mode 100644 index 0000000000000..df69354f3a400 --- /dev/null +++ b/src/test/run-make/wasm-custom-section/foo.js @@ -0,0 +1,46 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +const fs = require('fs'); +const process = require('process'); +const assert = require('assert'); +const buffer = fs.readFileSync(process.argv[2]); + +let m = new WebAssembly.Module(buffer); +let sections = WebAssembly.Module.customSections(m, "baz"); +console.log('section baz', sections); +assert.strictEqual(sections.length, 1); +let section = new Uint8Array(sections[0]); +console.log('contents', section); +assert.strictEqual(section.length, 2); +assert.strictEqual(section[0], 7); +assert.strictEqual(section[1], 8); + +sections = WebAssembly.Module.customSections(m, "bar"); +console.log('section bar', sections); +assert.strictEqual(sections.length, 1, "didn't pick up `bar` section from dependency"); +section = new Uint8Array(sections[0]); +console.log('contents', section); +assert.strictEqual(section.length, 2); +assert.strictEqual(section[0], 3); +assert.strictEqual(section[1], 4); + +sections = WebAssembly.Module.customSections(m, "foo"); +console.log('section foo', sections); +assert.strictEqual(sections.length, 1, "didn't create `foo` section"); +section = new Uint8Array(sections[0]); +console.log('contents', section); +assert.strictEqual(section.length, 4, "didn't concatenate `foo` sections"); +assert.strictEqual(section[0], 5); +assert.strictEqual(section[1], 6); +assert.strictEqual(section[2], 1); +assert.strictEqual(section[3], 2); + +process.exit(1); diff --git a/src/test/run-make/wasm-custom-section/foo.rs b/src/test/run-make/wasm-custom-section/foo.rs new file mode 100644 index 0000000000000..44d1efd7c2d62 --- /dev/null +++ b/src/test/run-make/wasm-custom-section/foo.rs @@ -0,0 +1,19 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "rlib"] +#![feature(wasm_custom_section)] +#![deny(warnings)] + +#[wasm_custom_section = "foo"] +const A: [u8; 2] = [1, 2]; + +#[wasm_custom_section = "bar"] +const B: [u8; 2] = [3, 4]; diff --git a/src/test/ui/feature-gate-wasm_custom_section.rs b/src/test/ui/feature-gate-wasm_custom_section.rs new file mode 100644 index 0000000000000..c695ef4ff068f --- /dev/null +++ b/src/test/ui/feature-gate-wasm_custom_section.rs @@ -0,0 +1,14 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[wasm_custom_section = "foo"] //~ ERROR: attribute is currently unstable +const A: [u8; 2] = [1, 2]; + +fn main() {} diff --git a/src/test/ui/feature-gate-wasm_custom_section.stderr b/src/test/ui/feature-gate-wasm_custom_section.stderr new file mode 100644 index 0000000000000..5977ec9edad5f --- /dev/null +++ b/src/test/ui/feature-gate-wasm_custom_section.stderr @@ -0,0 +1,11 @@ +error[E0658]: attribute is currently unstable + --> $DIR/feature-gate-wasm_custom_section.rs:11:1 + | +LL | #[wasm_custom_section = "foo"] //~ ERROR: attribute is currently unstable + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(wasm_custom_section)] to the crate attributes to enable + +error: aborting due to previous error + +If you want more information on this error, try using "rustc --explain E0658" diff --git a/src/test/ui/wasm-custom-section/malformed.rs b/src/test/ui/wasm-custom-section/malformed.rs new file mode 100644 index 0000000000000..13b1685a48072 --- /dev/null +++ b/src/test/ui/wasm-custom-section/malformed.rs @@ -0,0 +1,19 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(wasm_custom_section)] + +#[wasm_custom_section] //~ ERROR: must be of the form +const A: [u8; 1] = [0]; + +#[wasm_custom_section(foo)] //~ ERROR: must be of the form +const B: [u8; 1] = [0]; + +fn main() {} diff --git a/src/test/ui/wasm-custom-section/malformed.stderr b/src/test/ui/wasm-custom-section/malformed.stderr new file mode 100644 index 0000000000000..c716c824aebda --- /dev/null +++ b/src/test/ui/wasm-custom-section/malformed.stderr @@ -0,0 +1,14 @@ +error: must be of the form #[wasm_custom_section = "foo"] + --> $DIR/malformed.rs:13:1 + | +LL | #[wasm_custom_section] //~ ERROR: must be of the form + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: must be of the form #[wasm_custom_section = "foo"] + --> $DIR/malformed.rs:16:1 + | +LL | #[wasm_custom_section(foo)] //~ ERROR: must be of the form + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/wasm-custom-section/not-const.rs b/src/test/ui/wasm-custom-section/not-const.rs new file mode 100644 index 0000000000000..68077fb2fe4ac --- /dev/null +++ b/src/test/ui/wasm-custom-section/not-const.rs @@ -0,0 +1,29 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(wasm_custom_section)] + +#[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts +static A: [u8; 2] = [1, 2]; + +#[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts +struct B {} + +#[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts +enum C {} + +#[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts +impl B {} + +#[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts +mod d {} + +#[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts +fn main() {} diff --git a/src/test/ui/wasm-custom-section/not-const.stderr b/src/test/ui/wasm-custom-section/not-const.stderr new file mode 100644 index 0000000000000..17c85b3e848eb --- /dev/null +++ b/src/test/ui/wasm-custom-section/not-const.stderr @@ -0,0 +1,38 @@ +error: only allowed on consts + --> $DIR/not-const.rs:13:1 + | +LL | #[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: only allowed on consts + --> $DIR/not-const.rs:16:1 + | +LL | #[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: only allowed on consts + --> $DIR/not-const.rs:19:1 + | +LL | #[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: only allowed on consts + --> $DIR/not-const.rs:22:1 + | +LL | #[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: only allowed on consts + --> $DIR/not-const.rs:25:1 + | +LL | #[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: only allowed on consts + --> $DIR/not-const.rs:28:1 + | +LL | #[wasm_custom_section = "foo"] //~ ERROR: only allowed on consts + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 6 previous errors + diff --git a/src/test/ui/wasm-custom-section/not-slice.rs b/src/test/ui/wasm-custom-section/not-slice.rs new file mode 100644 index 0000000000000..2d91641a5f756 --- /dev/null +++ b/src/test/ui/wasm-custom-section/not-slice.rs @@ -0,0 +1,22 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(wasm_custom_section)] + +#[wasm_custom_section = "foo"] +const A: u8 = 0; //~ ERROR: must be an array of bytes + +#[wasm_custom_section = "foo"] +const B: &[u8] = &[0]; //~ ERROR: must be an array of bytes + +#[wasm_custom_section = "foo"] +const C: &[u8; 1] = &[0]; //~ ERROR: must be an array of bytes + +fn main() {} diff --git a/src/test/ui/wasm-custom-section/not-slice.stderr b/src/test/ui/wasm-custom-section/not-slice.stderr new file mode 100644 index 0000000000000..f2563ce0dddc1 --- /dev/null +++ b/src/test/ui/wasm-custom-section/not-slice.stderr @@ -0,0 +1,20 @@ +error: must be an array of bytes like `[u8; N]` + --> $DIR/not-slice.rs:14:1 + | +LL | const A: u8 = 0; //~ ERROR: must be an array of bytes + | ^^^^^^^^^^^^^^^^ + +error: must be an array of bytes like `[u8; N]` + --> $DIR/not-slice.rs:17:1 + | +LL | const B: &[u8] = &[0]; //~ ERROR: must be an array of bytes + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: must be an array of bytes like `[u8; N]` + --> $DIR/not-slice.rs:20:1 + | +LL | const C: &[u8; 1] = &[0]; //~ ERROR: must be an array of bytes + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 3 previous errors + diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 43220af4893bb..93b1b1f08e63f 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2396,13 +2396,6 @@ impl<'test> TestCx<'test> { .env("S", src_root) .env("RUST_BUILD_STAGE", &self.config.stage_id) .env("RUSTC", cwd.join(&self.config.rustc_path)) - .env( - "RUSTDOC", - cwd.join(&self.config - .rustdoc_path - .as_ref() - .expect("--rustdoc-path passed")), - ) .env("TMPDIR", &tmpdir) .env("LD_LIB_PATH_ENVVAR", dylib_env_var()) .env("HOST_RPATH_DIR", cwd.join(&self.config.compile_lib_path)) @@ -2417,6 +2410,14 @@ impl<'test> TestCx<'test> { .env_remove("MFLAGS") .env_remove("CARGO_MAKEFLAGS"); + if let Some(ref rustdoc) = self.config.rustdoc_path { + cmd.env("RUSTDOC", cwd.join(rustdoc)); + } + + if let Some(ref node) = self.config.nodejs { + cmd.env("NODE", node); + } + if let Some(ref linker) = self.config.linker { cmd.env("RUSTC_LINKER", linker); } From d889957dab5ee0778f9dd64faeafc8872645efed Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 10 Feb 2018 14:28:17 -0800 Subject: [PATCH 2/2] rustc: Add a `#[wasm_import_module]` attribute This commit adds a new attribute to the Rust compiler specific to the wasm target (and no other targets). The `#[wasm_import_module]` attribute is used to specify the module that a name is imported from, and is used like so: #[wasm_import_module = "./foo.js"] extern { fn some_js_function(); } Here the import of the symbol `some_js_function` is tagged with the `./foo.js` module in the wasm output file. Wasm-the-format includes two fields on all imports, a module and a field. The field is the symbol name (`some_js_function` above) and the module has historically unconditionally been `"env"`. I'm not sure if this `"env"` convention has asm.js or LLVM roots, but regardless we'd like the ability to configure it! The proposed ES module integration with wasm (aka a wasm module is "just another ES module") requires that the import module of wasm imports is interpreted as an ES module import, meaning that you'll need to encode paths, NPM packages, etc. As a result, we'll need this to be something other than `"env"`! Unfortunately neither our version of LLVM nor LLD supports custom import modules (aka anything not `"env"`). My hope is that by the time LLVM 7 is released both will have support, but in the meantime this commit adds some primitive encoding/decoding of wasm files to the compiler. This way rustc postprocesses the wasm module that LLVM emits to ensure it's got all the imports we'd like to have in it. Eventually I'd ideally like to unconditionally require this attribute to be placed on all `extern { ... }` blocks. For now though it seemed prudent to add it as an unstable attribute, so for now it's not required (as that'd force usage of a feature gate). Hopefully it doesn't take too long to "stabilize" this! cc rust-lang-nursery/rust-wasm#29 --- src/ci/docker/wasm32-unknown/Dockerfile | 1 + src/librustc/dep_graph/dep_node.rs | 3 + src/librustc/hir/check_attr.rs | 43 ++- src/librustc/ich/impls_cstore.rs | 7 +- src/librustc/middle/cstore.rs | 6 + src/librustc/ty/maps/config.rs | 18 ++ src/librustc/ty/maps/mod.rs | 9 +- src/librustc/ty/maps/plumbing.rs | 5 + src/librustc_metadata/creader.rs | 20 +- src/librustc_metadata/cstore.rs | 6 +- src/librustc_metadata/cstore_impl.rs | 22 +- src/librustc_metadata/decoder.rs | 10 +- src/librustc_metadata/encoder.rs | 12 +- src/librustc_metadata/foreign_modules.rs | 48 ++++ src/librustc_metadata/lib.rs | 1 + src/librustc_metadata/native_libs.rs | 7 +- src/librustc_metadata/schema.rs | 3 +- src/librustc_trans/attributes.rs | 46 ++++ src/librustc_trans/back/link.rs | 1 + src/librustc_trans/back/wasm.rs | 249 ++++++++++++++++-- src/librustc_trans/base.rs | 52 +++- src/librustc_trans/lib.rs | 3 + src/libsyntax/feature_gate.rs | 7 + src/test/run-make/wasm-custom-section/foo.js | 2 +- src/test/run-make/wasm-import-module/Makefile | 10 + src/test/run-make/wasm-import-module/bar.rs | 29 ++ src/test/run-make/wasm-import-module/foo.js | 28 ++ src/test/run-make/wasm-import-module/foo.rs | 18 ++ .../feature-gate-wasm_custom_section.stderr | 2 +- .../ui/feature-gate-wasm_import_module.rs | 15 ++ .../ui/feature-gate-wasm_import_module.stderr | 11 + src/test/ui/wasm-import-module.rs | 20 ++ src/test/ui/wasm-import-module.stderr | 14 + 33 files changed, 653 insertions(+), 75 deletions(-) create mode 100644 src/librustc_metadata/foreign_modules.rs create mode 100644 src/test/run-make/wasm-import-module/Makefile create mode 100644 src/test/run-make/wasm-import-module/bar.rs create mode 100644 src/test/run-make/wasm-import-module/foo.js create mode 100644 src/test/run-make/wasm-import-module/foo.rs create mode 100644 src/test/ui/feature-gate-wasm_import_module.rs create mode 100644 src/test/ui/feature-gate-wasm_import_module.stderr create mode 100644 src/test/ui/wasm-import-module.rs create mode 100644 src/test/ui/wasm-import-module.stderr diff --git a/src/ci/docker/wasm32-unknown/Dockerfile b/src/ci/docker/wasm32-unknown/Dockerfile index 0972eb85191a9..6c0ec1ad9d4e1 100644 --- a/src/ci/docker/wasm32-unknown/Dockerfile +++ b/src/ci/docker/wasm32-unknown/Dockerfile @@ -26,6 +26,7 @@ ENV RUST_CONFIGURE_ARGS \ --set rust.lld ENV SCRIPT python2.7 /checkout/x.py test --target $TARGETS \ + src/test/run-make \ src/test/ui \ src/test/run-pass \ src/test/compile-fail \ diff --git a/src/librustc/dep_graph/dep_node.rs b/src/librustc/dep_graph/dep_node.rs index 09d7ce599ab03..8bcec79d99f17 100644 --- a/src/librustc/dep_graph/dep_node.rs +++ b/src/librustc/dep_graph/dep_node.rs @@ -593,6 +593,7 @@ define_dep_nodes!( <'tcx> [] ImplementationsOfTrait { krate: CrateNum, trait_id: DefId }, [] AllTraitImplementations(CrateNum), + [] DllimportForeignItems(CrateNum), [] IsDllimportForeignItem(DefId), [] IsStaticallyIncludedForeignItem(DefId), [] NativeLibraryKind(DefId), @@ -655,6 +656,8 @@ define_dep_nodes!( <'tcx> [input] Features, [] ProgramClausesFor(DefId), + [] WasmImportModuleMap(CrateNum), + [] ForeignModules(CrateNum), ); trait DepNodeParams<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> : fmt::Debug { diff --git a/src/librustc/hir/check_attr.rs b/src/librustc/hir/check_attr.rs index f141cac161483..9b2647ad4db2b 100644 --- a/src/librustc/hir/check_attr.rs +++ b/src/librustc/hir/check_attr.rs @@ -26,6 +26,7 @@ enum Target { Union, Enum, Const, + ForeignMod, Other, } @@ -37,6 +38,7 @@ impl Target { hir::ItemUnion(..) => Target::Union, hir::ItemEnum(..) => Target::Enum, hir::ItemConst(..) => Target::Const, + hir::ItemForeignMod(..) => Target::ForeignMod, _ => Target::Other, } } @@ -57,25 +59,42 @@ impl<'a, 'tcx> CheckAttrVisitor<'a, 'tcx> { .emit(); } + let mut has_wasm_import_module = false; for attr in &item.attrs { - if let Some(name) = attr.name() { - if name == "inline" { - self.check_inline(attr, item, target) + if attr.check_name("inline") { + self.check_inline(attr, item, target) + } else if attr.check_name("wasm_import_module") { + has_wasm_import_module = true; + if attr.value_str().is_none() { + self.tcx.sess.span_err(attr.span, "\ + must be of the form #[wasm_import_module = \"...\"]"); + } + if target != Target::ForeignMod { + self.tcx.sess.span_err(attr.span, "\ + must only be attached to foreign modules"); + } + } else if attr.check_name("wasm_custom_section") { + if target != Target::Const { + self.tcx.sess.span_err(attr.span, "only allowed on consts"); } - if name == "wasm_custom_section" { - if target != Target::Const { - self.tcx.sess.span_err(attr.span, "only allowed on consts"); - } - - if attr.value_str().is_none() { - self.tcx.sess.span_err(attr.span, "must be of the form \ - #[wasm_custom_section = \"foo\"]"); - } + if attr.value_str().is_none() { + self.tcx.sess.span_err(attr.span, "must be of the form \ + #[wasm_custom_section = \"foo\"]"); } } } + if target == Target::ForeignMod && + !has_wasm_import_module && + self.tcx.sess.target.target.arch == "wasm32" && + false // FIXME: eventually enable this warning when stable + { + self.tcx.sess.span_warn(item.span, "\ + must have a #[wasm_import_module = \"...\"] attribute, this \ + will become a hard error before too long"); + } + self.check_repr(item, target); } diff --git a/src/librustc/ich/impls_cstore.rs b/src/librustc/ich/impls_cstore.rs index 18a02ff5c5882..0071850e1052b 100644 --- a/src/librustc/ich/impls_cstore.rs +++ b/src/librustc/ich/impls_cstore.rs @@ -33,7 +33,12 @@ impl_stable_hash_for!(struct middle::cstore::NativeLibrary { kind, name, cfg, - foreign_items + foreign_module +}); + +impl_stable_hash_for!(struct middle::cstore::ForeignModule { + foreign_items, + def_id }); impl_stable_hash_for!(enum middle::cstore::LinkagePreference { diff --git a/src/librustc/middle/cstore.rs b/src/librustc/middle/cstore.rs index 3c451d7ae46a1..add9b621596b6 100644 --- a/src/librustc/middle/cstore.rs +++ b/src/librustc/middle/cstore.rs @@ -132,7 +132,13 @@ pub struct NativeLibrary { pub kind: NativeLibraryKind, pub name: Symbol, pub cfg: Option, + pub foreign_module: Option, +} + +#[derive(Clone, Hash, RustcEncodable, RustcDecodable)] +pub struct ForeignModule { pub foreign_items: Vec, + pub def_id: DefId, } pub enum LoadedMacro { diff --git a/src/librustc/ty/maps/config.rs b/src/librustc/ty/maps/config.rs index 0b41c3ab2fa20..7565e90df986f 100644 --- a/src/librustc/ty/maps/config.rs +++ b/src/librustc/ty/maps/config.rs @@ -430,6 +430,12 @@ impl<'tcx> QueryDescription<'tcx> for queries::native_libraries<'tcx> { } } +impl<'tcx> QueryDescription<'tcx> for queries::foreign_modules<'tcx> { + fn describe(_tcx: TyCtxt, _: CrateNum) -> String { + format!("looking up the foreign modules of a linked crate") + } +} + impl<'tcx> QueryDescription<'tcx> for queries::plugin_registrar_fn<'tcx> { fn describe(_tcx: TyCtxt, _: CrateNum) -> String { format!("looking up the plugin registrar for a crate") @@ -705,6 +711,18 @@ impl<'tcx> QueryDescription<'tcx> for queries::program_clauses_for<'tcx> { } } +impl<'tcx> QueryDescription<'tcx> for queries::wasm_import_module_map<'tcx> { + fn describe(_tcx: TyCtxt, _: CrateNum) -> String { + format!("wasm import module map") + } +} + +impl<'tcx> QueryDescription<'tcx> for queries::dllimport_foreign_items<'tcx> { + fn describe(_tcx: TyCtxt, _: CrateNum) -> String { + format!("wasm import module map") + } +} + macro_rules! impl_disk_cacheable_query( ($query_name:ident, |$key:tt| $cond:expr) => { impl<'tcx> QueryDescription<'tcx> for queries::$query_name<'tcx> { diff --git a/src/librustc/ty/maps/mod.rs b/src/librustc/ty/maps/mod.rs index 2b4c1992762ea..c16ad0d8ca140 100644 --- a/src/librustc/ty/maps/mod.rs +++ b/src/librustc/ty/maps/mod.rs @@ -18,7 +18,7 @@ use infer::canonical::{Canonical, QueryResult}; use lint; use middle::borrowck::BorrowCheckResult; use middle::cstore::{ExternCrate, LinkagePreference, NativeLibrary, - ExternBodyNestedBodies}; + ExternBodyNestedBodies, ForeignModule}; use middle::cstore::{NativeLibraryKind, DepKind, CrateSource, ExternConstBody}; use middle::privacy::AccessLevels; use middle::reachable::ReachableSet; @@ -320,6 +320,9 @@ define_maps! { <'tcx> [] fn native_libraries: NativeLibraries(CrateNum) -> Lrc>, + + [] fn foreign_modules: ForeignModules(CrateNum) -> Lrc>, + [] fn plugin_registrar_fn: PluginRegistrarFn(CrateNum) -> Option, [] fn derive_registrar_fn: DeriveRegistrarFn(CrateNum) -> Option, [] fn crate_disambiguator: CrateDisambiguator(CrateNum) -> CrateDisambiguator, @@ -331,6 +334,8 @@ define_maps! { <'tcx> [] fn all_trait_implementations: AllTraitImplementations(CrateNum) -> Lrc>, + [] fn dllimport_foreign_items: DllimportForeignItems(CrateNum) + -> Lrc>, [] fn is_dllimport_foreign_item: IsDllimportForeignItem(DefId) -> bool, [] fn is_statically_included_foreign_item: IsStaticallyIncludedForeignItem(DefId) -> bool, [] fn native_library_kind: NativeLibraryKind(DefId) @@ -426,6 +431,8 @@ define_maps! { <'tcx> [] fn program_clauses_for: ProgramClausesFor(DefId) -> Lrc>>, [] fn wasm_custom_sections: WasmCustomSections(CrateNum) -> Lrc>, + [] fn wasm_import_module_map: WasmImportModuleMap(CrateNum) + -> Lrc>, } ////////////////////////////////////////////////////////////////////// diff --git a/src/librustc/ty/maps/plumbing.rs b/src/librustc/ty/maps/plumbing.rs index 910c00b832ef8..46106d8ec0e91 100644 --- a/src/librustc/ty/maps/plumbing.rs +++ b/src/librustc/ty/maps/plumbing.rs @@ -886,6 +886,9 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>, force!(all_trait_implementations, krate!()); } + DepKind::DllimportForeignItems => { + force!(dllimport_foreign_items, krate!()); + } DepKind::IsDllimportForeignItem => { force!(is_dllimport_foreign_item, def_id!()); } @@ -941,6 +944,8 @@ pub fn force_from_dep_node<'a, 'gcx, 'lcx>(tcx: TyCtxt<'a, 'gcx, 'lcx>, DepKind::ProgramClausesFor => { force!(program_clauses_for, def_id!()); } DepKind::WasmCustomSections => { force!(wasm_custom_sections, krate!()); } + DepKind::WasmImportModuleMap => { force!(wasm_import_module_map, krate!()); } + DepKind::ForeignModules => { force!(foreign_modules, krate!()); } } true diff --git a/src/librustc_metadata/creader.rs b/src/librustc_metadata/creader.rs index a0546b369a8eb..baaf57c890898 100644 --- a/src/librustc_metadata/creader.rs +++ b/src/librustc_metadata/creader.rs @@ -12,7 +12,6 @@ use cstore::{self, CStore, CrateSource, MetadataBlob}; use locator::{self, CratePaths}; -use native_libs::relevant_lib; use schema::CrateRoot; use rustc_data_structures::sync::{Lrc, RwLock, Lock}; @@ -230,7 +229,7 @@ impl<'a> CrateLoader<'a> { .map(|trait_impls| (trait_impls.trait_id, trait_impls.impls)) .collect(); - let mut cmeta = cstore::CrateMetadata { + let cmeta = cstore::CrateMetadata { name, extern_crate: Lock::new(None), def_path_table: Lrc::new(def_path_table), @@ -250,25 +249,8 @@ impl<'a> CrateLoader<'a> { rlib, rmeta, }, - // Initialize this with an empty set. The field is populated below - // after we were able to deserialize its contents. - dllimport_foreign_items: FxHashSet(), }; - let dllimports: FxHashSet<_> = cmeta - .root - .native_libraries - .decode((&cmeta, self.sess)) - .filter(|lib| relevant_lib(self.sess, lib) && - lib.kind == cstore::NativeLibraryKind::NativeUnknown) - .flat_map(|lib| { - assert!(lib.foreign_items.iter().all(|def_id| def_id.krate == cnum)); - lib.foreign_items.into_iter().map(|def_id| def_id.index) - }) - .collect(); - - cmeta.dllimport_foreign_items = dllimports; - let cmeta = Lrc::new(cmeta); self.cstore.set_crate_data(cnum, cmeta.clone()); (cnum, cmeta) diff --git a/src/librustc_metadata/cstore.rs b/src/librustc_metadata/cstore.rs index bd5ad93946e3c..53986f0741005 100644 --- a/src/librustc_metadata/cstore.rs +++ b/src/librustc_metadata/cstore.rs @@ -20,7 +20,7 @@ use rustc::middle::cstore::{DepKind, ExternCrate, MetadataLoader}; use rustc::session::{Session, CrateDisambiguator}; use rustc_back::PanicStrategy; use rustc_data_structures::indexed_vec::IndexVec; -use rustc::util::nodemap::{FxHashMap, FxHashSet, NodeMap}; +use rustc::util::nodemap::{FxHashMap, NodeMap}; use rustc_data_structures::sync::{Lrc, RwLock, Lock}; use syntax::{ast, attr}; @@ -30,7 +30,7 @@ use syntax_pos; pub use rustc::middle::cstore::{NativeLibrary, NativeLibraryKind, LinkagePreference}; pub use rustc::middle::cstore::NativeLibraryKind::*; -pub use rustc::middle::cstore::{CrateSource, LibSource}; +pub use rustc::middle::cstore::{CrateSource, LibSource, ForeignModule}; pub use cstore_impl::{provide, provide_extern}; @@ -84,8 +84,6 @@ pub struct CrateMetadata { pub source: CrateSource, pub proc_macros: Option)>>, - // Foreign items imported from a dylib (Windows only) - pub dllimport_foreign_items: FxHashSet, } pub struct CStore { diff --git a/src/librustc_metadata/cstore_impl.rs b/src/librustc_metadata/cstore_impl.rs index 3c2f984ef8b3f..e911a03bbe2b5 100644 --- a/src/librustc_metadata/cstore_impl.rs +++ b/src/librustc_metadata/cstore_impl.rs @@ -12,6 +12,7 @@ use cstore; use encoder; use link_args; use native_libs; +use foreign_modules; use schema; use rustc::ty::maps::QueryConfig; @@ -197,6 +198,7 @@ provide! { <'tcx> tcx, def_id, other, cdata, Lrc::new(reachable_non_generics) } native_libraries => { Lrc::new(cdata.get_native_libraries(tcx.sess)) } + foreign_modules => { Lrc::new(cdata.get_foreign_modules(tcx.sess)) } plugin_registrar_fn => { cdata.root.plugin_registrar_fn.map(|index| { DefId { krate: def_id.krate, index } @@ -224,9 +226,6 @@ provide! { <'tcx> tcx, def_id, other, cdata, Lrc::new(result) } - is_dllimport_foreign_item => { - cdata.is_dllimport_foreign_item(def_id.index) - } visibility => { cdata.get_visibility(def_id.index) } dep_kind => { let r = *cdata.dep_kind.lock(); @@ -306,13 +305,28 @@ pub fn provide<'tcx>(providers: &mut Providers<'tcx>) { tcx.native_libraries(id.krate) .iter() .filter(|lib| native_libs::relevant_lib(&tcx.sess, lib)) - .find(|l| l.foreign_items.contains(&id)) + .find(|lib| { + let fm_id = match lib.foreign_module { + Some(id) => id, + None => return false, + }; + tcx.foreign_modules(id.krate) + .iter() + .find(|m| m.def_id == fm_id) + .expect("failed to find foreign module") + .foreign_items + .contains(&id) + }) .map(|l| l.kind) }, native_libraries: |tcx, cnum| { assert_eq!(cnum, LOCAL_CRATE); Lrc::new(native_libs::collect(tcx)) }, + foreign_modules: |tcx, cnum| { + assert_eq!(cnum, LOCAL_CRATE); + Lrc::new(foreign_modules::collect(tcx)) + }, link_args: |tcx, cnum| { assert_eq!(cnum, LOCAL_CRATE); Lrc::new(link_args::collect(tcx)) diff --git a/src/librustc_metadata/decoder.rs b/src/librustc_metadata/decoder.rs index 0e5df3142af64..e72f9ddd82abe 100644 --- a/src/librustc_metadata/decoder.rs +++ b/src/librustc_metadata/decoder.rs @@ -10,7 +10,7 @@ // Decoding metadata from a single crate's metadata -use cstore::{self, CrateMetadata, MetadataBlob, NativeLibrary}; +use cstore::{self, CrateMetadata, MetadataBlob, NativeLibrary, ForeignModule}; use schema::*; use rustc_data_structures::sync::{Lrc, ReadGuard}; @@ -1031,6 +1031,10 @@ impl<'a, 'tcx> CrateMetadata { self.root.native_libraries.decode((self, sess)).collect() } + pub fn get_foreign_modules(&self, sess: &Session) -> Vec { + self.root.foreign_modules.decode((self, sess)).collect() + } + pub fn get_dylib_dependency_formats(&self) -> Vec<(CrateNum, LinkagePreference)> { self.root .dylib_dependency_formats @@ -1103,10 +1107,6 @@ impl<'a, 'tcx> CrateMetadata { } } - pub fn is_dllimport_foreign_item(&self, id: DefIndex) -> bool { - self.dllimport_foreign_items.contains(&id) - } - pub fn fn_sig(&self, id: DefIndex, tcx: TyCtxt<'a, 'tcx, 'tcx>) diff --git a/src/librustc_metadata/encoder.rs b/src/librustc_metadata/encoder.rs index 56981b8f4a1e9..39de1ec852ec4 100644 --- a/src/librustc_metadata/encoder.rs +++ b/src/librustc_metadata/encoder.rs @@ -14,7 +14,7 @@ use isolated_encoder::IsolatedEncoder; use schema::*; use rustc::middle::cstore::{LinkMeta, LinkagePreference, NativeLibrary, - EncodedMetadata}; + EncodedMetadata, ForeignModule}; use rustc::hir::def::CtorKind; use rustc::hir::def_id::{CrateNum, CRATE_DEF_INDEX, DefIndex, DefId, LocalDefId, LOCAL_CRATE}; use rustc::hir::map::definitions::DefPathTable; @@ -412,6 +412,10 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { ()); let native_lib_bytes = self.position() - i; + let foreign_modules = self.tracked( + IsolatedEncoder::encode_foreign_modules, + ()); + // Encode codemap i = self.position(); let codemap = self.encode_codemap(); @@ -480,6 +484,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> { lang_items, lang_items_missing, native_libraries, + foreign_modules, codemap, def_path_table, impls, @@ -1337,6 +1342,11 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> { self.lazy_seq(used_libraries.iter().cloned()) } + fn encode_foreign_modules(&mut self, _: ()) -> LazySeq { + let foreign_modules = self.tcx.foreign_modules(LOCAL_CRATE); + self.lazy_seq(foreign_modules.iter().cloned()) + } + fn encode_crate_deps(&mut self, _: ()) -> LazySeq { let crates = self.tcx.crates(); diff --git a/src/librustc_metadata/foreign_modules.rs b/src/librustc_metadata/foreign_modules.rs new file mode 100644 index 0000000000000..c44d891b7f39a --- /dev/null +++ b/src/librustc_metadata/foreign_modules.rs @@ -0,0 +1,48 @@ +// Copyright 2017 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use rustc::hir::itemlikevisit::ItemLikeVisitor; +use rustc::hir; +use rustc::middle::cstore::ForeignModule; +use rustc::ty::TyCtxt; + +pub fn collect<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Vec { + let mut collector = Collector { + tcx, + modules: Vec::new(), + }; + tcx.hir.krate().visit_all_item_likes(&mut collector); + return collector.modules +} + +struct Collector<'a, 'tcx: 'a> { + tcx: TyCtxt<'a, 'tcx, 'tcx>, + modules: Vec, +} + +impl<'a, 'tcx> ItemLikeVisitor<'tcx> for Collector<'a, 'tcx> { + fn visit_item(&mut self, it: &'tcx hir::Item) { + let fm = match it.node { + hir::ItemForeignMod(ref fm) => fm, + _ => return, + }; + + let foreign_items = fm.items.iter() + .map(|it| self.tcx.hir.local_def_id(it.id)) + .collect(); + self.modules.push(ForeignModule { + foreign_items, + def_id: self.tcx.hir.local_def_id(it.id), + }); + } + + fn visit_trait_item(&mut self, _it: &'tcx hir::TraitItem) {} + fn visit_impl_item(&mut self, _it: &'tcx hir::ImplItem) {} +} diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs index f77c22bd89544..8509966744948 100644 --- a/src/librustc_metadata/lib.rs +++ b/src/librustc_metadata/lib.rs @@ -56,6 +56,7 @@ mod isolated_encoder; mod schema; mod native_libs; mod link_args; +mod foreign_modules; pub mod creader; pub mod cstore; diff --git a/src/librustc_metadata/native_libs.rs b/src/librustc_metadata/native_libs.rs index 2504f8dc251f9..4bb6d8fb87cf5 100644 --- a/src/librustc_metadata/native_libs.rs +++ b/src/librustc_metadata/native_libs.rs @@ -105,14 +105,11 @@ impl<'a, 'tcx> ItemLikeVisitor<'tcx> for Collector<'a, 'tcx> { } else { None }; - let foreign_items = fm.items.iter() - .map(|it| self.tcx.hir.local_def_id(it.id)) - .collect(); let lib = NativeLibrary { name: n, kind, cfg, - foreign_items, + foreign_module: Some(self.tcx.hir.local_def_id(it.id)), }; self.register_native_lib(Some(m.span), lib); } @@ -218,7 +215,7 @@ impl<'a, 'tcx> Collector<'a, 'tcx> { name: Symbol::intern(new_name.unwrap_or(name)), kind: if let Some(k) = kind { k } else { cstore::NativeUnknown }, cfg: None, - foreign_items: Vec::new(), + foreign_module: None, }; self.register_native_lib(None, lib); } diff --git a/src/librustc_metadata/schema.rs b/src/librustc_metadata/schema.rs index 001772623e75b..9832794529701 100644 --- a/src/librustc_metadata/schema.rs +++ b/src/librustc_metadata/schema.rs @@ -15,8 +15,8 @@ use rustc::hir; use rustc::hir::def::{self, CtorKind}; use rustc::hir::def_id::{DefIndex, DefId, CrateNum}; use rustc::ich::StableHashingContext; -use rustc::middle::cstore::{DepKind, LinkagePreference, NativeLibrary}; use rustc::middle::exported_symbols::{ExportedSymbol, SymbolExportLevel}; +use rustc::middle::cstore::{DepKind, LinkagePreference, NativeLibrary, ForeignModule}; use rustc::middle::lang_items; use rustc::mir; use rustc::session::CrateDisambiguator; @@ -200,6 +200,7 @@ pub struct CrateRoot { pub lang_items: LazySeq<(DefIndex, usize)>, pub lang_items_missing: LazySeq, pub native_libraries: LazySeq, + pub foreign_modules: LazySeq, pub codemap: LazySeq, pub def_path_table: Lazy, pub impls: LazySeq, diff --git a/src/librustc_trans/attributes.rs b/src/librustc_trans/attributes.rs index 16253aa92acc7..df78ccdd2298a 100644 --- a/src/librustc_trans/attributes.rs +++ b/src/librustc_trans/attributes.rs @@ -18,6 +18,7 @@ use rustc::session::config::Sanitizer; use rustc::ty::TyCtxt; use rustc::ty::maps::Providers; use rustc_data_structures::sync::Lrc; +use rustc_data_structures::fx::FxHashMap; use llvm::{self, Attribute, ValueRef}; use llvm::AttributePlace::Function; @@ -141,6 +142,20 @@ pub fn from_fn_attrs(cx: &CodegenCx, llfn: ValueRef, id: DefId) { llfn, llvm::AttributePlace::Function, cstr("target-features\0"), &val); } + + // Note that currently the `wasm-import-module` doesn't do anything, but + // eventually LLVM 7 should read this and ferry the appropriate import + // module to the output file. + if cx.tcx.sess.target.target.arch == "wasm32" { + if let Some(module) = wasm_import_module(cx.tcx, id) { + llvm::AddFunctionAttrStringValue( + llfn, + llvm::AttributePlace::Function, + cstr("wasm-import-module\0"), + &module, + ); + } + } } fn cstr(s: &'static str) -> &CStr { @@ -170,6 +185,8 @@ pub fn provide(providers: &mut Providers) { tcx.hir.krate().visit_all_item_likes(&mut finder); Lrc::new(finder.list) }; + + provide_extern(providers); } struct WasmSectionFinder<'a, 'tcx: 'a> { @@ -192,3 +209,32 @@ impl<'a, 'tcx: 'a> ItemLikeVisitor<'tcx> for WasmSectionFinder<'a, 'tcx> { fn visit_impl_item(&mut self, _: &'tcx hir::ImplItem) {} } + +pub fn provide_extern(providers: &mut Providers) { + providers.wasm_import_module_map = |tcx, cnum| { + let mut ret = FxHashMap(); + for lib in tcx.foreign_modules(cnum).iter() { + let attrs = tcx.get_attrs(lib.def_id); + let mut module = None; + for attr in attrs.iter().filter(|a| a.check_name("wasm_import_module")) { + module = attr.value_str(); + } + let module = match module { + Some(s) => s, + None => continue, + }; + for id in lib.foreign_items.iter() { + assert_eq!(id.krate, cnum); + ret.insert(*id, module.to_string()); + } + } + + Lrc::new(ret) + } +} + +fn wasm_import_module(tcx: TyCtxt, id: DefId) -> Option { + tcx.wasm_import_module_map(id.krate) + .get(&id) + .map(|s| CString::new(&s[..]).unwrap()) +} diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index 8e8ba823b6f8d..542cdc5baad32 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -813,6 +813,7 @@ fn link_natively(sess: &Session, } if sess.opts.target_triple == "wasm32-unknown-unknown" { + wasm::rewrite_imports(&out_filename, &trans.crate_info.wasm_imports); wasm::add_custom_sections(&out_filename, &trans.crate_info.wasm_custom_sections); } diff --git a/src/librustc_trans/back/wasm.rs b/src/librustc_trans/back/wasm.rs index 99f1e4b7e78fe..d6d386c9fbe77 100644 --- a/src/librustc_trans/back/wasm.rs +++ b/src/librustc_trans/back/wasm.rs @@ -8,37 +8,254 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +use std::collections::BTreeMap; use std::fs; use std::path::Path; -use std::collections::BTreeMap; +use std::str; +use rustc_data_structures::fx::FxHashMap; use serialize::leb128; +// https://webassembly.github.io/spec/core/binary/modules.html#binary-importsec +const WASM_IMPORT_SECTION_ID: u8 = 2; + +const WASM_EXTERNAL_KIND_FUNCTION: u8 = 0; +const WASM_EXTERNAL_KIND_TABLE: u8 = 1; +const WASM_EXTERNAL_KIND_MEMORY: u8 = 2; +const WASM_EXTERNAL_KIND_GLOBAL: u8 = 3; + +/// Append all the custom sections listed in `sections` to the wasm binary +/// specified at `path`. +/// +/// LLVM 6 which we're using right now doesn't have the ability to create custom +/// sections in wasm files nor does LLD have the ability to merge these sections +/// into one larger section when linking. It's expected that this will +/// eventually get implemented, however! +/// +/// Until that time though this is a custom implementation in rustc to append +/// all sections to a wasm file to the finished product that LLD produces. +/// +/// Support for this is landing in LLVM in https://reviews.llvm.org/D43097, +/// although after that support will need to be in LLD as well. pub fn add_custom_sections(path: &Path, sections: &BTreeMap>) { - let mut wasm = fs::read(path).expect("failed to read wasm output"); + if sections.len() == 0 { + return + } + + let wasm = fs::read(path).expect("failed to read wasm output"); // see https://webassembly.github.io/spec/core/binary/modules.html#custom-section + let mut wasm = WasmEncoder { data: wasm }; for (section, bytes) in sections { // write the `id` identifier, 0 for a custom section - let len = wasm.len(); - leb128::write_u32_leb128(&mut wasm, len, 0); + wasm.byte(0); // figure out how long our name descriptor will be - let mut name = Vec::new(); - leb128::write_u32_leb128(&mut name, 0, section.len() as u32); - name.extend_from_slice(section.as_bytes()); + let mut name = WasmEncoder::new(); + name.str(section); + + // write the length of the payload followed by all its contents + wasm.u32((bytes.len() + name.data.len()) as u32); + wasm.data.extend_from_slice(&name.data); + wasm.data.extend_from_slice(bytes); + } + + fs::write(path, &wasm.data).expect("failed to write wasm output"); +} + +/// Rewrite the module imports are listed from in a wasm module given the field +/// name to module name mapping in `import_map`. +/// +/// LLVM 6 which we're using right now doesn't have the ability to configure the +/// module a wasm symbol is import from. Rather all imported symbols come from +/// the bland `"env"` module unconditionally. Furthermore we'd *also* need +/// support in LLD for preserving these import modules, which it unfortunately +/// currently does not. +/// +/// This function is intended as a hack for now where we manually rewrite the +/// wasm output by LLVM to have the correct import modules listed. The +/// `#[wasm_import_module]` attribute in Rust translates to the module that each +/// symbol is imported from, so here we manually go through the wasm file, +/// decode it, rewrite imports, and then rewrite the wasm module. +/// +/// Support for this was added to LLVM in +/// https://github.com/llvm-mirror/llvm/commit/0f32e1365, although support still +/// needs to be added (AFAIK at the time of this writing) to LLD +pub fn rewrite_imports(path: &Path, import_map: &FxHashMap) { + if import_map.len() == 0 { + return + } + + let wasm = fs::read(path).expect("failed to read wasm output"); + let mut ret = WasmEncoder::new(); + ret.data.extend(&wasm[..8]); + + // skip the 8 byte wasm/version header + for (id, raw) in WasmSections(WasmDecoder::new(&wasm[8..])) { + ret.byte(id); + if id == WASM_IMPORT_SECTION_ID { + info!("rewriting import section"); + let data = rewrite_import_section( + &mut WasmDecoder::new(raw), + import_map, + ); + ret.bytes(&data); + } else { + info!("carry forward section {}, {} bytes long", id, raw.len()); + ret.bytes(raw); + } + } + + fs::write(path, &ret.data).expect("failed to write wasm output"); + + fn rewrite_import_section( + wasm: &mut WasmDecoder, + import_map: &FxHashMap, + ) + -> Vec + { + let mut dst = WasmEncoder::new(); + let n = wasm.u32(); + dst.u32(n); + info!("rewriting {} imports", n); + for _ in 0..n { + rewrite_import_entry(wasm, &mut dst, import_map); + } + return dst.data + } + + fn rewrite_import_entry(wasm: &mut WasmDecoder, + dst: &mut WasmEncoder, + import_map: &FxHashMap) { + // More info about the binary format here is available at: + // https://webassembly.github.io/spec/core/binary/modules.html#import-section + // + // Note that you can also find the whole point of existence of this + // function here, where we map the `module` name to a different one if + // we've got one listed. + let module = wasm.str(); + let field = wasm.str(); + let new_module = if module == "env" { + import_map.get(field).map(|s| &**s).unwrap_or(module) + } else { + module + }; + info!("import rewrite ({} => {}) / {}", module, new_module, field); + dst.str(new_module); + dst.str(field); + let kind = wasm.byte(); + dst.byte(kind); + match kind { + WASM_EXTERNAL_KIND_FUNCTION => dst.u32(wasm.u32()), + WASM_EXTERNAL_KIND_TABLE => { + dst.byte(wasm.byte()); // element_type + dst.limits(wasm.limits()); + } + WASM_EXTERNAL_KIND_MEMORY => dst.limits(wasm.limits()), + WASM_EXTERNAL_KIND_GLOBAL => { + dst.byte(wasm.byte()); // content_type + dst.bool(wasm.bool()); // mutable + } + b => panic!("unknown kind: {}", b), + } + } +} - // write the length of the payload - let len = wasm.len(); - let total_len = bytes.len() + name.len(); - leb128::write_u32_leb128(&mut wasm, len, total_len as u32); +struct WasmSections<'a>(WasmDecoder<'a>); - // write out the name section - wasm.extend(name); +impl<'a> Iterator for WasmSections<'a> { + type Item = (u8, &'a [u8]); - // and now the payload itself - wasm.extend_from_slice(bytes); + fn next(&mut self) -> Option<(u8, &'a [u8])> { + if self.0.data.len() == 0 { + return None + } + + // see https://webassembly.github.io/spec/core/binary/modules.html#sections + let id = self.0.byte(); + let section_len = self.0.u32(); + info!("new section {} / {} bytes", id, section_len); + let section = self.0.skip(section_len as usize); + Some((id, section)) } +} + +struct WasmDecoder<'a> { + data: &'a [u8], +} - fs::write(path, &wasm).expect("failed to write wasm output"); +impl<'a> WasmDecoder<'a> { + fn new(data: &'a [u8]) -> WasmDecoder<'a> { + WasmDecoder { data } + } + + fn byte(&mut self) -> u8 { + self.skip(1)[0] + } + + fn u32(&mut self) -> u32 { + let (n, l1) = leb128::read_u32_leb128(self.data); + self.data = &self.data[l1..]; + return n + } + + fn skip(&mut self, amt: usize) -> &'a [u8] { + let (data, rest) = self.data.split_at(amt); + self.data = rest; + data + } + + fn str(&mut self) -> &'a str { + let len = self.u32(); + str::from_utf8(self.skip(len as usize)).unwrap() + } + + fn bool(&mut self) -> bool { + self.byte() == 1 + } + + fn limits(&mut self) -> (u32, Option) { + let has_max = self.bool(); + (self.u32(), if has_max { Some(self.u32()) } else { None }) + } +} + +struct WasmEncoder { + data: Vec, +} + +impl WasmEncoder { + fn new() -> WasmEncoder { + WasmEncoder { data: Vec::new() } + } + + fn u32(&mut self, val: u32) { + let at = self.data.len(); + leb128::write_u32_leb128(&mut self.data, at, val); + } + + fn byte(&mut self, val: u8) { + self.data.push(val); + } + + fn bytes(&mut self, val: &[u8]) { + self.u32(val.len() as u32); + self.data.extend_from_slice(val); + } + + fn str(&mut self, val: &str) { + self.bytes(val.as_bytes()) + } + + fn bool(&mut self, b: bool) { + self.byte(b as u8); + } + + fn limits(&mut self, limits: (u32, Option)) { + self.bool(limits.1.is_some()); + self.u32(limits.0); + if let Some(c) = limits.1 { + self.u32(c); + } + } } diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs index 11f952bc5bc77..56eece9f31e7e 100644 --- a/src/librustc_trans/base.rs +++ b/src/librustc_trans/base.rs @@ -72,6 +72,7 @@ use type_::Type; use type_of::LayoutLlvmExt; use rustc::util::nodemap::{FxHashMap, FxHashSet, DefIdSet}; use CrateInfo; +use rustc_data_structures::sync::Lrc; use std::any::Any; use std::collections::BTreeMap; @@ -1072,14 +1073,15 @@ impl CrateInfo { used_crates_static: cstore::used_crates(tcx, LinkagePreference::RequireStatic), used_crate_source: FxHashMap(), wasm_custom_sections: BTreeMap::new(), + wasm_imports: FxHashMap(), }; - let load_wasm_sections = tcx.sess.crate_types.borrow() + let load_wasm_items = tcx.sess.crate_types.borrow() .iter() .any(|c| *c != config::CrateTypeRlib) && tcx.sess.opts.target_triple == "wasm32-unknown-unknown"; - if load_wasm_sections { + if load_wasm_items { info!("attempting to load all wasm sections"); for &id in tcx.wasm_custom_sections(LOCAL_CRATE).iter() { let (name, contents) = fetch_wasm_section(tcx, id); @@ -1087,6 +1089,7 @@ impl CrateInfo { .or_insert(Vec::new()) .extend(contents); } + info.load_wasm_imports(tcx, LOCAL_CRATE); } for &cnum in tcx.crates().iter() { @@ -1108,19 +1111,27 @@ impl CrateInfo { if tcx.is_no_builtins(cnum) { info.is_no_builtins.insert(cnum); } - if load_wasm_sections { + if load_wasm_items { for &id in tcx.wasm_custom_sections(cnum).iter() { let (name, contents) = fetch_wasm_section(tcx, id); info.wasm_custom_sections.entry(name) .or_insert(Vec::new()) .extend(contents); } + info.load_wasm_imports(tcx, cnum); } } - return info } + + fn load_wasm_imports(&mut self, tcx: TyCtxt, cnum: CrateNum) { + for (&id, module) in tcx.wasm_import_module_map(cnum).iter() { + let instance = Instance::mono(tcx, id); + let import_name = tcx.symbol_name(instance); + self.wasm_imports.insert(import_name.to_string(), module.clone()); + } + } } fn is_translated_item(tcx: TyCtxt, id: DefId) -> bool { @@ -1248,6 +1259,39 @@ pub fn provide(providers: &mut Providers) { .expect(&format!("failed to find cgu with name {:?}", name)) }; providers.compile_codegen_unit = compile_codegen_unit; + + provide_extern(providers); +} + +pub fn provide_extern(providers: &mut Providers) { + providers.dllimport_foreign_items = |tcx, krate| { + let module_map = tcx.foreign_modules(krate); + let module_map = module_map.iter() + .map(|lib| (lib.def_id, lib)) + .collect::>(); + + let dllimports = tcx.native_libraries(krate) + .iter() + .filter(|lib| { + if lib.kind != cstore::NativeLibraryKind::NativeUnknown { + return false + } + let cfg = match lib.cfg { + Some(ref cfg) => cfg, + None => return true, + }; + attr::cfg_matches(cfg, &tcx.sess.parse_sess, None) + }) + .filter_map(|lib| lib.foreign_module) + .map(|id| &module_map[&id]) + .flat_map(|module| module.foreign_items.iter().cloned()) + .collect(); + Lrc::new(dllimports) + }; + + providers.is_dllimport_foreign_item = |tcx, def_id| { + tcx.dllimport_foreign_items(def_id.krate).contains(&def_id) + }; } pub fn linkage_to_llvm(linkage: Linkage) -> llvm::Linkage { diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index bb2aeca374882..9f654c8ab29c0 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -216,6 +216,8 @@ impl TransCrate for LlvmTransCrate { fn provide_extern(&self, providers: &mut ty::maps::Providers) { back::symbol_export::provide_extern(providers); + base::provide_extern(providers); + attributes::provide_extern(providers); } fn trans_crate<'a, 'tcx>( @@ -403,6 +405,7 @@ struct CrateInfo { used_crates_static: Vec<(CrateNum, LibSource)>, used_crates_dynamic: Vec<(CrateNum, LibSource)>, wasm_custom_sections: BTreeMap>, + wasm_imports: FxHashMap, } __build_diagnostic_array! { librustc_trans, DIAGNOSTICS } diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index dbcfee208ca2d..270cee26948e3 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -454,6 +454,9 @@ declare_features! ( // The #[wasm_custom_section] attribute (active, wasm_custom_section, "1.26.0", None, None), + + // The #![wasm_import_module] attribute + (active, wasm_import_module, "1.26.0", None, None), ); declare_features! ( @@ -920,6 +923,10 @@ pub const BUILTIN_ATTRIBUTES: &'static [(&'static str, AttributeType, AttributeG "the `#[no_debug]` attribute was an experimental feature that has been \ deprecated due to lack of demand", cfg_fn!(no_debug))), + ("wasm_import_module", Normal, Gated(Stability::Unstable, + "wasm_import_module", + "experimental attribute", + cfg_fn!(wasm_import_module))), ("omit_gdb_pretty_printer_section", Whitelisted, Gated(Stability::Unstable, "omit_gdb_pretty_printer_section", "the `#[omit_gdb_pretty_printer_section]` \ diff --git a/src/test/run-make/wasm-custom-section/foo.js b/src/test/run-make/wasm-custom-section/foo.js index df69354f3a400..e7a4cfc344efb 100644 --- a/src/test/run-make/wasm-custom-section/foo.js +++ b/src/test/run-make/wasm-custom-section/foo.js @@ -43,4 +43,4 @@ assert.strictEqual(section[1], 6); assert.strictEqual(section[2], 1); assert.strictEqual(section[3], 2); -process.exit(1); +process.exit(0); diff --git a/src/test/run-make/wasm-import-module/Makefile b/src/test/run-make/wasm-import-module/Makefile new file mode 100644 index 0000000000000..399951e516314 --- /dev/null +++ b/src/test/run-make/wasm-import-module/Makefile @@ -0,0 +1,10 @@ +-include ../../run-make-fulldeps/tools.mk + +ifeq ($(TARGET),wasm32-unknown-unknown) +all: + $(RUSTC) foo.rs --target wasm32-unknown-unknown + $(RUSTC) bar.rs -C lto -O --target wasm32-unknown-unknown + $(NODE) foo.js $(TMPDIR)/bar.wasm +else +all: +endif diff --git a/src/test/run-make/wasm-import-module/bar.rs b/src/test/run-make/wasm-import-module/bar.rs new file mode 100644 index 0000000000000..9e659223c651c --- /dev/null +++ b/src/test/run-make/wasm-import-module/bar.rs @@ -0,0 +1,29 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "cdylib"] +#![feature(wasm_import_module)] +#![deny(warnings)] + +extern crate foo; + +#[wasm_import_module = "./me"] +extern { + #[link_name = "me_in_dep"] + fn dep(); +} + +#[no_mangle] +pub extern fn foo() { + unsafe { + foo::dep(); + dep(); + } +} diff --git a/src/test/run-make/wasm-import-module/foo.js b/src/test/run-make/wasm-import-module/foo.js new file mode 100644 index 0000000000000..369962e55b1eb --- /dev/null +++ b/src/test/run-make/wasm-import-module/foo.js @@ -0,0 +1,28 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +const fs = require('fs'); +const process = require('process'); +const assert = require('assert'); +const buffer = fs.readFileSync(process.argv[2]); + +let m = new WebAssembly.Module(buffer); +let imports = WebAssembly.Module.imports(m); +console.log('imports', imports); +assert.strictEqual(imports.length, 2); + +assert.strictEqual(imports[0].kind, 'function'); +assert.strictEqual(imports[1].kind, 'function'); + +let modules = [imports[0].module, imports[1].module]; +modules.sort(); + +assert.strictEqual(modules[0], './dep'); +assert.strictEqual(modules[1], './me'); diff --git a/src/test/run-make/wasm-import-module/foo.rs b/src/test/run-make/wasm-import-module/foo.rs new file mode 100644 index 0000000000000..bcd2ca70befaa --- /dev/null +++ b/src/test/run-make/wasm-import-module/foo.rs @@ -0,0 +1,18 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "rlib"] +#![feature(wasm_import_module)] +#![deny(warnings)] + +#[wasm_import_module = "./dep"] +extern { + pub fn dep(); +} diff --git a/src/test/ui/feature-gate-wasm_custom_section.stderr b/src/test/ui/feature-gate-wasm_custom_section.stderr index 5977ec9edad5f..1b4415539f449 100644 --- a/src/test/ui/feature-gate-wasm_custom_section.stderr +++ b/src/test/ui/feature-gate-wasm_custom_section.stderr @@ -8,4 +8,4 @@ LL | #[wasm_custom_section = "foo"] //~ ERROR: attribute is currently unstable error: aborting due to previous error -If you want more information on this error, try using "rustc --explain E0658" +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/feature-gate-wasm_import_module.rs b/src/test/ui/feature-gate-wasm_import_module.rs new file mode 100644 index 0000000000000..c5898a9c12697 --- /dev/null +++ b/src/test/ui/feature-gate-wasm_import_module.rs @@ -0,0 +1,15 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[wasm_import_module = "test"] //~ ERROR: experimental +extern { +} + +fn main() {} diff --git a/src/test/ui/feature-gate-wasm_import_module.stderr b/src/test/ui/feature-gate-wasm_import_module.stderr new file mode 100644 index 0000000000000..bae5fa9d5956c --- /dev/null +++ b/src/test/ui/feature-gate-wasm_import_module.stderr @@ -0,0 +1,11 @@ +error[E0658]: experimental attribute + --> $DIR/feature-gate-wasm_import_module.rs:11:1 + | +LL | #[wasm_import_module = "test"] //~ ERROR: experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(wasm_import_module)] to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/wasm-import-module.rs b/src/test/ui/wasm-import-module.rs new file mode 100644 index 0000000000000..0b743d9e486b6 --- /dev/null +++ b/src/test/ui/wasm-import-module.rs @@ -0,0 +1,20 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(wasm_import_module)] + +#[wasm_import_module] //~ ERROR: must be of the form +extern {} + +#[wasm_import_module = "foo"] //~ ERROR: must only be attached to +fn foo() {} + +fn main() {} + diff --git a/src/test/ui/wasm-import-module.stderr b/src/test/ui/wasm-import-module.stderr new file mode 100644 index 0000000000000..bf301ce5269a7 --- /dev/null +++ b/src/test/ui/wasm-import-module.stderr @@ -0,0 +1,14 @@ +error: must be of the form #[wasm_import_module = "..."] + --> $DIR/wasm-import-module.rs:13:1 + | +LL | #[wasm_import_module] //~ ERROR: must be of the form + | ^^^^^^^^^^^^^^^^^^^^^ + +error: must only be attached to foreign modules + --> $DIR/wasm-import-module.rs:16:1 + | +LL | #[wasm_import_module = "foo"] //~ ERROR: must only be attached to + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors +