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

0.2.3 does not build with sccache on macOS #13

Open
virtualritz opened this issue Sep 12, 2020 · 1 comment
Open

0.2.3 does not build with sccache on macOS #13

virtualritz opened this issue Sep 12, 2020 · 1 comment

Comments

@virtualritz
Copy link

Trying to compile the examples for bevy on macOS I get spirv-reflect failing:
os: macOS 10.15.6
compiler: Apple clang 11.0.3

warning: error: invalid argument '-std=c++11' not allowed with 'C'

error: failed to run custom build command for `spirv-reflect v0.2.3`

Caused by:
  process didn't exit successfully: `/Users/moritz/code/crates/bevy/target/debug/build/spirv-reflect-e0c20f0369bf5f90/build-script-build` (exit code: 1)
  --- stdout
  TARGET = Some("x86_64-apple-darwin")
  OPT_LEVEL = Some("0")
  HOST = Some("x86_64-apple-darwin")
  CXX_x86_64-apple-darwin = None
  CXX_x86_64_apple_darwin = None
  HOST_CXX = None
  CXX = None
  CXXFLAGS_x86_64-apple-darwin = None
  CXXFLAGS_x86_64_apple_darwin = None
  HOST_CXXFLAGS = None
  CXXFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("true")
  CARGO_CFG_TARGET_FEATURE = Some("cmpxchg16b,fxsr,mmx,sse,sse2,sse3,ssse3")
  running: "sccache" "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-stdlib=libc++" "-I" "src" "-Wall" "-Wextra" "-std=c++11" "-Wno-missing-field-initializers" "-Wno-sign-compare" "-Wno-deprecated" "-o" "/Users/moritz/code/crates/bevy/target/debug/build/spirv-reflect-c4be2b0e2b8154af/out/vendor/spirv_reflect.o" "-c" "vendor/spirv_reflect.c"
  cargo:warning=error: invalid argument '-std=c++11' not allowed with 'C'
  exit code: 1

  --- stderr


  error occurred: Command "sccache" "c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-arch" "x86_64" "-stdlib=libc++" "-I" "src" "-Wall" "-Wextra" "-std=c++11" "-Wno-missing-field-initializers" "-Wno-sign-compare" "-Wno-deprecated" "-o" "/Users/moritz/code/crates/bevy/target/debug/build/spirv-reflect-c4be2b0e2b8154af/out/vendor/spirv_reflect.o" "-c" "vendor/spirv_reflect.c" with args "c++" did not execute successfully (status code exit code: 1).

I guess this is LLVM/clang asking to be concise. If vendor/spirv_reflect.c is C, omit C++ flags. If it is C++, rename it to vendor/spirv_reflect.cpp. But that's just a guess.

@virtualritz
Copy link
Author

The reason for this is apparently that spirv-reflect doesn not build with sccache. Unsetting RUSTC_WRAPPER makes this disappear.

@virtualritz virtualritz changed the title 0.2.3 broken on macOS 0.2.3 does not build with sccache on macOS Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant