|
@ -183,13 +183,19 @@ impl Config { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
fn compiler(&self, target: &str) -> String { |
|
|
fn compiler(&self, target: &str) -> String { |
|
|
let compiler_fn: fn(&str) -> String = if self.cpp { gxx } else { gcc }; |
|
|
if self.cpp { |
|
|
compiler_fn(target) |
|
|
gxx(target) |
|
|
|
|
|
} else { |
|
|
|
|
|
gcc(target) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
fn compile_flags(&self) -> Vec<String> { |
|
|
fn compile_flags(&self) -> Vec<String> { |
|
|
let flags_fn: fn() -> Vec<String> = if self.cpp { cxxflags } else { cflags }; |
|
|
if self.cpp { |
|
|
flags_fn() |
|
|
cxxflags() |
|
|
|
|
|
} else { |
|
|
|
|
|
cflags() |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
fn compile_cmd(&self) -> Command { |
|
|
fn compile_cmd(&self) -> Command { |
|
|