<div dir="ltr">You should have gotten an "argument unused during compilation" warning that you can promote to an error.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Wed, Jul 26, 2017 at 5:41 PM, Khem Raj via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
I am compiling a package which pokes at compiler for -msse4.2 option and<br>
if compiler accepts it then it happily adds the intel specific<br>
intrinsics to code path. This works fine in cross compile environment<br>
with gcc since gcc when configure for cross compiling for arm targets<br>
rejects this option however with clang, configured for multiple targets<br>
<br>
LLVM_TARGETS_TO_BUILD = "AArch64;ARM;Mips;PowerPC;X86"<br>
<br>
it happily accepts -msse4.2 when called to cross compile for arm.<br>
<br>
arm-bec-linux-gnueabi-clang -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard<br>
-mcpu=cortex-a7 -mlittle-endian -march=armv7a<br>
--sysroot=/mnt/a/oe/build/tmp/<wbr>work/cortexa7t2hf-neon-vfpv4-<wbr>bec-linux-gnueabi/leveldb/1.<wbr>20+gitAUTOINC+a53934a3ae-r0/<wbr>recipe-sysroot<br>
 -O2 -msse4.2<br>
clang-5.0: error: no input files<br>
<br>
I believe it would be better if clang could cross check for target<br>
options and error out and flag these kind of incompatible combinations<br>
<br>
may be there is already an option to do so, I would be happy to know<br>
since this would fix my issue once for all.<br>
<br>
Thanks<br>
<span class="HOEnZb"><font color="#888888">-Khem<br>
<br>
</font></span><br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>