mozangle icon indicating copy to clipboard operation
mozangle copied to clipboard

Can't build with new versions of cc-rs when using sccache

Open jdm opened this issue 5 years ago • 2 comments

Linux builds break with this error:

running: "sccache" "clang++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "--target=x86_64-unknown-linux-gnu" "-I" "gfx/angle/checkout/include/" "-I" "gfx/angle/checkout/out/gen/angle/" "-I" "gfx/angle/checkout/src/" "-I" "gfx/angle/checkout/src/common/third_party/base/" "-std=c++14" "-msse2" "-DANGLE_ENABLE_DEBUG_ANNOTATIONS" "-DANGLE_ENABLE_ESSL" "-DANGLE_ENABLE_GLSL" "-DANGLE_ENABLE_HLSL" "-DANGLE_ENABLE_KEYEDMUTEX" "-DANGLE_SKIP_DXGI_1_2_CHECK" "-DDYNAMIC_ANNOTATIONS_ENABLED=1" "-DNOMINMAX" "-DNTDDI_VERSION=0x0A000003" "-DUNICODE" "-DWINVER=0x0A00" "-D_ATL_NO_OPENGL" "-D_CRT_RAND_S" "-D_CRT_SECURE_NO_DEPRECATE" "-D_HAS_EXCEPTIONS=0" "-D_SCL_SECURE_NO_DEPRECATE" "-D_SECURE_ATL" "-D_UNICODE" "-D__NDK_FPABI__=" "-o" "/repo/target/debug/build/mozangle-b2466e97cbb8dddf/out/gfx/angle/checkout/src/common/third_party/xxhash/xxhash.o" "-c" "gfx/angle/checkout/src/common/third_party/xxhash/xxhash.c"
exit code: 0
cargo:warning=error: invalid argument '-std=c++14' not allowed with 'C'
exit code: 1

Building with updated cc-rs and without sccache does not trigger this error. I suspect https://github.com/alexcrichton/cc-rs/commit/4b72474342c3d75d5122f7fec446018adf25e5e0 triggers the change in behaviour.

jdm avatar May 01 '20 19:05 jdm

I'm experimenting with alternatives in https://github.com/servo/mozangle/compare/master...jdm-patch-4?quick_pull=1.

jdm avatar May 01 '20 20:05 jdm

I've tracked down the cause of the behaviour change to https://github.com/mozilla/sccache/issues/803. We will hopefully be able to work around it by forcing C++ mode when building with clang.

jdm avatar Jun 26 '20 18:06 jdm