I am trying to build compiler-rt on a x86_64 machine using clang.
Command used:
CC=clang CXX=clang++ cmake -DLLVM_CONFIG_PATH=/bin/llvm-config -DCOMPILER_RT_INSTALL_PATH=/lib/clang/3.7.0
after this command on console it prints,
– Compiler-RT supported architectures: x86_64
Instead if I use gcc in above command, it supports both i386, x86_64
– Compiler-RT supported architectures: x86_64;i386
I am curious about why its not supporting i386 with clang, as this clang can compile a simple program for i386.
Looking into cmake file, it looks like i386 is failing this test.
I have checked variables for both the target, which looks fine to me:
– {CAN_TARGET_x86_64}: TRUE
– {CMAKE_BINARY_DIR}: /home/mohit/compiler-rt_build
– {SIMPLE_SOURCE}: /home/mohit/compiler-rt_build/CMakeFiles/simple.cc
– {TARGET_x86_64_CFLAGS}: -m64
– TARGET_{arch}_OUTPUT: TARGET_x86_64_OUTPUT
– -DCMAKE_EXE_LINKER_FLAGS:STRING={argstring}:-DCMAKE_EXE_LINKER_FLAGS:STRING= -m64
– {CAN_TARGET_i386}: FALSE
– {CMAKE_BINARY_DIR}: /home/mohit/compiler-rt_build
– {SIMPLE_SOURCE}: /home/mohit/compiler-rt_build/CMakeFiles/simple.cc
– {TARGET_i386_CFLAGS}: -m32
– TARGET_{arch}_OUTPUT: TARGET_i386_OUTPUT
– -DCMAKE_EXE_LINKER_FLAGS:STRING={argstring}:-DCMAKE_EXE_LINKER_FLAGS:STRING= -m32
Regards,
Mohit.