[cfe-users] Installing CFE 3.7.0 : glitches with CFE OpenMP support if not build in-tree?
Hi, I need to install CLang/LLVM 3.7.0 with OpenMP support (libomp), and for various reasons I need to do it with the following configuration : * llvm + compiler-rt + openmp installed in some custom folder * cfe + clang-tools-extra (depending on the llvm above) as a separate installation somewhere else Up to now I wasn't able to configure the build to generate a proper support for OpenMP, as it seems the compiler paths are not set up correctly to find the 'omp.h' header when "-fopenmp=libomp" option is passed: $ clang++ -fopenmp=libomp main.cpp main.cpp:1:10: fatal error: 'omp.h' file not found #include "omp.h" ^ 1 error generated. If I add the include path explicitly everything works as expected: $ clang++ -I/lib/clang/3.7.0/include main.cpp -fopenmp=libomp $ ./a.out Hello from thread 0 of 4 Hello from thread 1 of 4 Hello from thread 3 of 4 Hello from thread 2 of 4 Is there any option or definition I overlooked in the documentation that will correctly configure clang to add the "omp.h" include path among the defaults if "-fopenmp=libomp" is given? Thanks, Massimiliano ___ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users
[cfe-users] Is it possible to translate or forward flags from clang to llc?
Hi, I'm looking into what could be the best way to add compiler flags for Clang to emit optimized code for a specific chip on a given architecture. Looking at various sources I saw that: - llc -march= -mcpu=help returns the list of the supported cpus which is already helpful. The piece of information I'm currently missing is how to translate llc's flags like: - `-march=x86-64 -mcpu=broadwell` - `-march=aarch64 -mattr=+v8.1a,+fp-armv8,+neon,+crc,+crypto` etc. into something that is understood by clang. In case the context for doing this is of interest, I'm a core developer of a package manager focused on HPC (https://github.com/spack/spack) and we'll use this information to automatically inject optimization flags when installing application from sources based on the chip selected by the user. Cheers, Massimiliano Culpo ___ cfe-users mailing list cfe-users@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users