/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

extern crate cmake;
use std::env;

fn main() {
    let dst = cmake::Config::new(".").build();
    println!("cargo:rustc-link-search=native={}", dst.display());
    println!("cargo:rustc-link-lib=static=angle");
    let target = env::var("TARGET").unwrap();
    if target.contains("apple") {
        println!("cargo:rustc-link-lib=c++");
    } else if !target.contains("windows-msvc") {
        println!("cargo:rustc-link-lib=stdc++");
    }
}

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

extern crate cmake;
use std::env;

fn main() {
    let dst = cmake::Config::new(".").build();
    println!("cargo:rustc-link-search=native={}", dst.display());
    println!("cargo:rustc-link-lib=static=angle");
    let target = env::var("TARGET").unwrap();
    if !target.contains("windows-msvc") {
        println!("cargo:rustc-link-lib=stdc++");
    }
}

--- 
+++ 
@@ -10,7 +10,9 @@
     println!("cargo:rustc-link-search=native={}", dst.display());
     println!("cargo:rustc-link-lib=static=angle");
     let target = env::var("TARGET").unwrap();
-    if !target.contains("windows-msvc") {
+    if target.contains("apple") {
+        println!("cargo:rustc-link-lib=c++");
+    } else if !target.contains("windows-msvc") {
         println!("cargo:rustc-link-lib=stdc++");
     }
 }
Switch to libc++ on OS X
