Skip to content

Commit 7e1a1e9

Browse files
authored
Merge pull request #259 from paoloteti/cc-rs
Remove superfluous cc flags
2 parents 4bbfb7e + 8128d99 commit 7e1a1e9

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

build.rs

-26
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ mod c {
110110
let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap();
111111
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
112112
let target_vendor = env::var("CARGO_CFG_TARGET_VENDOR").unwrap();
113-
let target_arch_arm =
114-
target_arch.contains("arm") ||
115-
target_arch.contains("thumb");
116113
let cfg = &mut cc::Build::new();
117114

118115
cfg.warnings(false);
@@ -141,29 +138,6 @@ mod c {
141138
cfg.define("VISIBILITY_HIDDEN", None);
142139
}
143140

144-
// NOTE Most of the ARM intrinsics are written in assembly. Tell gcc which arch we are going
145-
// to target to make sure that the assembly implementations really work for the target. If
146-
// the implementation is not valid for the arch, then gcc will error when compiling it.
147-
if llvm_target[0].starts_with("thumb") {
148-
cfg.flag("-mthumb");
149-
}
150-
151-
if target_arch_arm && llvm_target.last() == Some(&"eabihf") {
152-
cfg.flag("-mfloat-abi=hard");
153-
}
154-
155-
if llvm_target[0] == "thumbv6m" {
156-
cfg.flag("-march=armv6-m");
157-
}
158-
159-
if llvm_target[0] == "thumbv7m" {
160-
cfg.flag("-march=armv7-m");
161-
}
162-
163-
if llvm_target[0] == "thumbv7em" {
164-
cfg.flag("-march=armv7e-m");
165-
}
166-
167141
let mut sources = Sources::new();
168142
sources.extend(
169143
&[

0 commit comments

Comments
 (0)