Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

Commit f2a5271

Browse files
committed
use shlex
1 parent 56fc219 commit f2a5271

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ authors = ["Alex Gaynor <[email protected]>"]
77

88
[build-dependencies]
99
bindgen = "*"
10-
nix = "0.10.0"
10+
nix = "0.10"
11+
shlex = "0.1"

build.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
extern crate bindgen;
22
extern crate nix;
3+
extern crate shlex;
34

45
use std::env;
56
use std::path::PathBuf;
@@ -23,11 +24,9 @@ fn main() {
2324
.unwrap()
2425
.stdout,
2526
).unwrap();
26-
assert!(!output.contains('"'));
27-
assert!(!output.contains('\''));
2827

29-
for arg in output.split(' ') {
30-
builder = builder.clang_arg(arg);
28+
for arg in shlex::split(&output).unwrap() {
29+
builder = builder.clang_arg(arg.to_string());
3130
}
3231

3332
for h in HEADERS {

0 commit comments

Comments
 (0)