llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.09k stars 12k forks source link

Bootstrapping clang fails because of emmintrin.h #24309

Open llvmbot opened 9 years ago

llvmbot commented 9 years ago
Bugzilla Link 23935
Version trunk
OS Linux
Attachments fix
Reporter LLVM Bugzilla Contributor
CC @rengolin,@zygoloid

Extended Description

When using cmake to bootstrap clang (crosscompiling the entire llvm+clang+libc++ combo), the build fails because various files in (at least) tools/clang/lib/Base and tools/clang/lib/Lex try to #include , which is part of clang and therefore doesn't exist in the target sysroot yet.

The patch I'm attaching fixes the problem for me by making clang look for headers in its source directory.

ec04fc15-fa35-46f2-80e1-5d271f2ef708 commented 9 years ago

This patch isn't correct; the host compiler is supposed to provide emmintrin.h. Which compiler are you using that defines SSE2 but doesn't provide the corresponding header? Perhaps we need a configure-time check for it.