Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MSVC #70

Merged
merged 1 commit into from Jul 18, 2018

Conversation

Projects
None yet
3 participants
@ferjm
Copy link
Contributor

commented Jul 18, 2018

Fixes #59

@ferjm ferjm referenced this pull request Jul 18, 2018

Merged

WebAudio API #21158

6 of 6 tasks complete
@ferjm

This comment has been minimized.

Copy link
Contributor Author

commented Jul 18, 2018

I tested this building glib-sys and it seems to work properly.

src/lib.rs Outdated
@@ -410,6 +393,10 @@ impl Config {
if self.is_static(name) {
cmd.arg("--static");
}
let target = env::var("TARGET").unwrap_or_else(|_| String::new());
if target.contains("msvc") {

This comment has been minimized.

Copy link
@sdroege

sdroege Jul 18, 2018

Collaborator

Why not

if let Some(target) = env::var("TARGET") {
    if target.contains("msvc") {
        cmd.arg("--msvc-syntax");
    }
}

or something with match and guards for the contains?
One level of indentation more, but doesn't have the empty string, which seems a bit ugly to me

@ferjm ferjm force-pushed the ferjm:msvc branch from 90740a5 to 70cf85e Jul 18, 2018

@sdroege

This comment has been minimized.

Copy link
Collaborator

commented Jul 18, 2018

Looks good to me and should work, at least better than what we have currently. As @nirbheek said in #59, --msvc-syntax had some issues in the past in some corner cases but we can worry about that when it happens.

@alexcrichton alexcrichton merged commit 2a0011d into rust-lang:master Jul 18, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@alexcrichton

This comment has been minimized.

Copy link
Member

commented Jul 18, 2018

Thanks!

@sdroege

This comment has been minimized.

Copy link
Collaborator

commented Jul 18, 2018

@alexcrichton Thanks! Can you prepare a new release with that change?

@alexcrichton

This comment has been minimized.

Copy link
Member

commented Jul 18, 2018

Sure thing, done!

@ferjm ferjm deleted the ferjm:msvc branch Jul 19, 2018

@ferjm ferjm referenced this pull request Jul 19, 2018

Closed

Bump pkg-config version #623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.