aboutsummaryrefslogtreecommitdiff
path: root/cc/cc-test
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2018-12-10 21:02:04 -0800
committerDaniel Mueller <deso@posteo.net>2018-12-10 21:02:04 -0800
commit8898de1f97aff9965e1518ca5abb554275183a14 (patch)
treeac7deb92599ec56d67432766b2cf4cd63388833a /cc/cc-test
parente2604a756aaddcd5919ee2f1b9cc0055d200f846 (diff)
downloadnitrocli-8898de1f97aff9965e1518ca5abb554275183a14.tar.gz
nitrocli-8898de1f97aff9965e1518ca5abb554275183a14.tar.bz2
Update cc crate to 1.0.25
This change updates the cc crate to version 1.0.25. Import subrepo cc/:cc at fe0a7acb6d3e22e03bf83bcbf89367be888b5448
Diffstat (limited to 'cc/cc-test')
-rw-r--r--cc/cc-test/build.rs20
-rw-r--r--cc/cc-test/src/aarch64.S10
2 files changed, 18 insertions, 12 deletions
diff --git a/cc/cc-test/build.rs b/cc/cc-test/build.rs
index 5a7b178..677161e 100644
--- a/cc/cc-test/build.rs
+++ b/cc/cc-test/build.rs
@@ -25,12 +25,12 @@ fn main() {
let target = std::env::var("TARGET").unwrap();
let file = target.split("-").next().unwrap();
- let file = format!("src/{}.{}",
- file,
- if target.contains("msvc") { "asm" } else { "S" });
- cc::Build::new()
- .file(file)
- .compile("asm");
+ let file = format!(
+ "src/{}.{}",
+ file,
+ if target.contains("msvc") { "asm" } else { "S" }
+ );
+ cc::Build::new().file(file).compile("asm");
cc::Build::new()
.file("src/baz.cpp")
@@ -38,9 +38,7 @@ fn main() {
.compile("baz");
if target.contains("windows") {
- cc::Build::new()
- .file("src/windows.c")
- .compile("windows");
+ cc::Build::new().file("src/windows.c").compile("windows");
}
// Test that the `windows_registry` module will set PATH by looking for
@@ -86,9 +84,7 @@ fn main() {
.file("src/opt_linkage.c")
.compile("OptLinkage");
- let out = cc::Build::new()
- .file("src/expand.c")
- .expand();
+ let out = cc::Build::new().file("src/expand.c").expand();
let out = String::from_utf8(out).unwrap();
assert!(out.contains("hello world"));
}
diff --git a/cc/cc-test/src/aarch64.S b/cc/cc-test/src/aarch64.S
new file mode 100644
index 0000000..1d9062d
--- /dev/null
+++ b/cc/cc-test/src/aarch64.S
@@ -0,0 +1,10 @@
+.globl asm
+asm:
+ mov w0, 7
+ ret
+
+.globl _asm
+_asm:
+ mov w0, 7
+ ret
+