about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2019-12-05 14:43:53 -0800
committerEric Huss <eric@huss.org>2019-12-09 08:08:13 -0800
commit590dd7dfef3e835756edb5f920bf31cd19eef4d0 (patch)
treec7b2838dc38c2a331b2771f83289e0bcc26a08cf /src/tools/compiletest
parenta0312c156d8470179101ab71ef6a69c0b9a8dd0b (diff)
downloadrust-590dd7dfef3e835756edb5f920bf31cd19eef4d0.tar.gz
rust-590dd7dfef3e835756edb5f920bf31cd19eef4d0.zip
Add options to --extern flag.
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/header.rs2
-rw-r--r--src/tools/compiletest/src/runtest.rs10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index dc4811e5d24..ca30e782c50 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -311,7 +311,7 @@ pub struct TestProps {
     // directory as the test, but for backwards compatibility reasons
     // we also check the auxiliary directory)
     pub aux_builds: Vec<String>,
-    // A list of crates to pass '--extern-private name:PATH' flags for
+    // A list of crates to pass '--extern priv:name=PATH' flags for
     // This should be a subset of 'aux_build'
     // FIXME: Replace this with a better solution: https://github.com/rust-lang/rust/pull/54020
     pub extern_private: Vec<String>,
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 15ae67fb12c..ca68fe3e39b 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1782,8 +1782,8 @@ impl<'test> TestCx<'test> {
         let mut add_extern_priv = |priv_dep: &str, dylib: bool| {
             let lib_name = get_lib_name(priv_dep, dylib);
             rustc
-                .arg("--extern-private")
-                .arg(format!("{}={}", priv_dep, aux_dir.join(lib_name).to_str().unwrap()));
+                .arg("--extern")
+                .arg(format!("priv:{}={}", priv_dep, aux_dir.join(lib_name).to_str().unwrap()));
         };
 
         for rel_ab in &self.props.aux_builds {
@@ -1829,9 +1829,9 @@ impl<'test> TestCx<'test> {
 
             let trimmed = rel_ab.trim_end_matches(".rs").to_string();
 
-            // Normally, every 'extern-private' has a correspodning 'aux-build'
+            // Normally, every 'extern-private' has a corresponding 'aux-build'
             // entry. If so, we remove it from our list of private crates,
-            // and add an '--extern-private' flag to rustc
+            // and add an '--extern priv:NAME=PATH' flag to rustc
             if extern_priv.remove_item(&trimmed).is_some() {
                 add_extern_priv(&trimmed, dylib);
             }
@@ -1859,7 +1859,7 @@ impl<'test> TestCx<'test> {
             }
         }
 
-        // Add any '--extern-private' entries without a matching
+        // Add any '--extern' private entries without a matching
         // 'aux-build'
         for private_lib in extern_priv {
             add_extern_priv(&private_lib, true);