about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/run-make-fulldeps/extern-fn-reachable/Makefile20
-rw-r--r--src/test/run-make-fulldeps/extern-fn-reachable/main.rs18
-rw-r--r--src/tools/tidy/src/deps.rs3
3 files changed, 20 insertions, 21 deletions
diff --git a/src/test/run-make-fulldeps/extern-fn-reachable/Makefile b/src/test/run-make-fulldeps/extern-fn-reachable/Makefile
index 79a9a3c640f..9231a2b3574 100644
--- a/src/test/run-make-fulldeps/extern-fn-reachable/Makefile
+++ b/src/test/run-make-fulldeps/extern-fn-reachable/Makefile
@@ -1,9 +1,25 @@
 -include ../tools.mk
 
+# ignore-windows-msvc
+
+NM=nm -D
+
+ifeq ($(UNAME),Darwin)
+NM=nm -gU
+endif
+
+ifdef IS_WINDOWS
+NM=nm -g
+endif
+
 # This overrides the LD_LIBRARY_PATH for RUN
 TARGET_RPATH_DIR:=$(TARGET_RPATH_DIR):$(TMPDIR)
 
 all:
 	$(RUSTC) dylib.rs -o $(TMPDIR)/libdylib.so -C prefer-dynamic
-	$(RUSTC) main.rs -C prefer-dynamic
-	$(call RUN,main)
+
+	[ "$$($(NM) $(TMPDIR)/libdylib.so | grep -v __imp_ | grep -c fun1)" -eq "1" ]
+	[ "$$($(NM) $(TMPDIR)/libdylib.so | grep -v __imp_ | grep -c fun2)" -eq "1" ]
+	[ "$$($(NM) $(TMPDIR)/libdylib.so | grep -v __imp_ | grep -c fun3)" -eq "1" ]
+	[ "$$($(NM) $(TMPDIR)/libdylib.so | grep -v __imp_ | grep -c fun4)" -eq "1" ]
+	[ "$$($(NM) $(TMPDIR)/libdylib.so | grep -v __imp_ | grep -c fun5)" -eq "1" ]
diff --git a/src/test/run-make-fulldeps/extern-fn-reachable/main.rs b/src/test/run-make-fulldeps/extern-fn-reachable/main.rs
deleted file mode 100644
index c1de6477585..00000000000
--- a/src/test/run-make-fulldeps/extern-fn-reachable/main.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-#![feature(rustc_private)]
-
-extern crate rustc_metadata;
-
-use rustc_metadata::dynamic_lib::DynamicLibrary;
-use std::path::Path;
-
-pub fn main() {
-    unsafe {
-        let path = Path::new("libdylib.so");
-        let a = DynamicLibrary::open(&path).unwrap();
-        assert!(a.symbol::<isize>("fun1").is_ok());
-        assert!(a.symbol::<isize>("fun2").is_ok());
-        assert!(a.symbol::<isize>("fun3").is_ok());
-        assert!(a.symbol::<isize>("fun4").is_ok());
-        assert!(a.symbol::<isize>("fun5").is_ok());
-    }
-}
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
index bc33284f31e..d27afa497f6 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
@@ -15,6 +15,7 @@ const LICENSES: &[&str] = &[
     "Apache-2.0 OR MIT",
     "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", // wasi license
     "MIT",
+    "ISC",
     "Unlicense/MIT",
     "Unlicense OR MIT",
     "0BSD OR MIT OR Apache-2.0", // adler license
@@ -53,7 +54,6 @@ const EXCEPTIONS_CRANELIFT: &[(&str, &str)] = &[
     ("cranelift-module", "Apache-2.0 WITH LLVM-exception"),
     ("cranelift-native", "Apache-2.0 WITH LLVM-exception"),
     ("cranelift-object", "Apache-2.0 WITH LLVM-exception"),
-    ("libloading", "ISC"),
     ("mach", "BSD-2-Clause"),
     ("regalloc", "Apache-2.0 WITH LLVM-exception"),
     ("target-lexicon", "Apache-2.0 WITH LLVM-exception"),
@@ -129,6 +129,7 @@ const PERMITTED_DEPENDENCIES: &[&str] = &[
     "jobserver",
     "lazy_static",
     "libc",
+    "libloading",
     "libz-sys",
     "lock_api",
     "log",