ACE_TAO
ACE_TAO copied to clipboard
MPC wrongly passes /U file paths to cl
MPC invokes the compiler as:
$(COMPILE.c) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $(abspath $<)
When cross-compiling to Windows using LLVM/clang-cl, this causes any source file in a root folder beginning with /U
(like /Users/foo/bar.c
) to trigger the compiler's /U<A>
flag.
This can only be prevented by passing --
before any input files.
MPC needs to define and accept (normally empty) variable, similar to $(CC_OUTPUT_FLAG)
and $(CC_OUTPUT_FLAG_SEP)
, and pass it before any input files.
Is this -type make
?
-type gnuace
gnuace is maintained in the ACE_TAO repository. Please create an issue there with all the steps necessary to reproduce the problem.
@alexchandel if you give us all the steps necessary to reproduce the problem we can look at this
This can be replicated by cross-compiling to Windows using LLVM's clang-cl. The replication steps are complex and depend on your environment, but look at the example above/below:
MPC invokes the compiler as $(COMPILE.c) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $(abspath $<)
. Source paths that begin with /U
, like /Users/foo/bar.c
, will be passed to the compiler via $(abspath $<)
. clang-cl will treat /U
as a flag and return an error.
Instead, the compiler should be invoked as:
$(COMPILE.c) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $(CC_END_OF_OPTIONS) $(abspath $<)
Where CC_END_OF_OPTIONS
is defined empty (?=
), but can be overridden by the user to --
.
OK, please submit a pull request to add support for this compiler to ACE.