rust-lang/cc-rs

VxWorks wr-cc is detected as MSVC compiler, cc adds flags "no-logo", "W4" and "--" which causes compilation issues.

Closed this issue · 6 comments

Does VxWorks wr-cc define any macro?

If it does, then we could use it to detect VxWorks wr-cc compiler.

Does VxWorks wr-cc define any macro?

If it does, then we could use it to detect VxWorks wr-cc compiler.

Yes. It does have __VXWORKS__ macro. I'll try using this. Additionally, whenever compiling a program, cc-crate would add target=some_target. For VxWorks this behavior causes issues as each wr-cc is configured for one target.

How does it distinguish clang from msvc on linux. On linux GNUC and clang both would be defined.

You could put it in detect_compiler_family.c then modify tool.rs to support VxWorks wr-cc

How does it distinguish clang from msvc on linux. On linux GNUC and clang both would be defined.

We pass -? to the compiler to detect msvc.

Oh

How does it distinguish clang from msvc on linux. On linux GNUC and clang both would be defined.

We pass -? to the compiler to detect msvc.

Yeah. For some reason wr-cc -? returns 0.