From 9ff3d4594512e8cb70177bbbbfa5d261b3abd6b1 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Mon, 6 Feb 2017 17:18:22 -0800 Subject: [PATCH] servo: Merge #15414 - Use -stdlib=libc++ on mac for stylo bindgen (from upsuper:macos-libcxx); r=emilio r? @emilio Source-Repo: https://github.com/servo/servo Source-Revision: a1d19ca5f831536ee60bb4fa85a9d3ea53c2170e --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 0345f85ba78976b312924e9053c1c15d70bdff4f --- servo/components/style/build_gecko.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/servo/components/style/build_gecko.rs b/servo/components/style/build_gecko.rs index fb464c1f7b28..d947323ced78 100644 --- a/servo/components/style/build_gecko.rs +++ b/servo/components/style/build_gecko.rs @@ -138,7 +138,12 @@ mod bindings { if cfg!(target_os = "linux") { builder = builder.clang_arg("-DOS_LINUX=1"); } else if cfg!(target_os = "macos") { - builder = builder.clang_arg("-DOS_MACOSX=1"); + builder = builder.clang_arg("-DOS_MACOSX=1") + .clang_arg("-stdlib=libc++") + // To disable the fixup bindgen applies which adds search + // paths from clang command line in order to avoid potential + // conflict with -stdlib=libc++. + .clang_arg("--target=x86_64-apple-darwin"); } else if cfg!(target_env = "msvc") { builder = builder.clang_arg("-DOS_WIN=1").clang_arg("-DWIN32=1") // For compatibility with MSVC 2015