clang

ld: -bundle and -bitcode_bundle cannot be used together

空扰寡人 提交于 2021-01-27 04:51:32
问题 i'm building llvm/clang 3.7 with bitcode support ( -fembed-bitcode ). Some modules can't be linked due to error: ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together clang: error: linker command failed with exit code 1 (use -v to see invocation) Full error output: Linking CXX shared module ../../lib/BugpointPasses.dylib cd /Volumes/Transcend/dev/src/llvm_37_ios_any_build/tools/bugpoint-passes && /usr/local/Cellar/cmake/2.8.12.2/bin/cmake -E cmake_link

ld: -bundle and -bitcode_bundle cannot be used together

北城余情 提交于 2021-01-27 04:51:28
问题 i'm building llvm/clang 3.7 with bitcode support ( -fembed-bitcode ). Some modules can't be linked due to error: ld: -bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together clang: error: linker command failed with exit code 1 (use -v to see invocation) Full error output: Linking CXX shared module ../../lib/BugpointPasses.dylib cd /Volumes/Transcend/dev/src/llvm_37_ios_any_build/tools/bugpoint-passes && /usr/local/Cellar/cmake/2.8.12.2/bin/cmake -E cmake_link

Why constexpr must be static?

独自空忆成欢 提交于 2021-01-27 04:07:04
问题 An attempt to create a member of a struct with constexpr attribute without being static result in a compiler error(see below). Why is that? for a single constant value will I have this value in memory until program is terminatted instead of just scope of struct? should I back to use a macro? struct foo { constexpr int n = 10; // ... }; error: non-static data member cannot be constexpr; did you intend to make it static? 回答1: I don't know the official rational. But surely it could lead to

clang++ 3.2 linker not finding C++ stdlib

做~自己de王妃 提交于 2021-01-27 03:54:01
问题 I've installed clang 3.2 on my Ubuntu 13.04 machine, and have compiled and built libc++, and everything is in place. However, when I try to link my (really simple) code, the linker reports that references to std::cout etc. are undefined. If anyone could advise me what I could do to solve this, I'd be very grateful -- I've tried everything I can think of. The commands and output are here: $ clang++ -v -stdlib=libc++ -lpthread -ldl sqlite3/sqlite3.o src/world.o -o bin/world Ubuntu clang version

clang++ 3.2 linker not finding C++ stdlib

被刻印的时光 ゝ 提交于 2021-01-27 03:50:39
问题 I've installed clang 3.2 on my Ubuntu 13.04 machine, and have compiled and built libc++, and everything is in place. However, when I try to link my (really simple) code, the linker reports that references to std::cout etc. are undefined. If anyone could advise me what I could do to solve this, I'd be very grateful -- I've tried everything I can think of. The commands and output are here: $ clang++ -v -stdlib=libc++ -lpthread -ldl sqlite3/sqlite3.o src/world.o -o bin/world Ubuntu clang version

(Where) Does clang document implementation-defined behavior?

笑着哭i 提交于 2021-01-27 01:41:14
问题 Implementation-defined behaviors in C are unspecified behaviors for which each conforming implementation must document its choice. I found such documentations easily for gcc here or Microsoft C here, but I can't find any such documentation for clang. Am I searching wrong or is there no such thing? 回答1: This ticket https://bugs.llvm.org/show_bug.cgi?id=11272 is still opened (for many years now) so it seems that clang doesn't explicitly specify implementation defined behaviour. For most cases I

(Where) Does clang document implementation-defined behavior?

喜夏-厌秋 提交于 2021-01-27 01:40:20
问题 Implementation-defined behaviors in C are unspecified behaviors for which each conforming implementation must document its choice. I found such documentations easily for gcc here or Microsoft C here, but I can't find any such documentation for clang. Am I searching wrong or is there no such thing? 回答1: This ticket https://bugs.llvm.org/show_bug.cgi?id=11272 is still opened (for many years now) so it seems that clang doesn't explicitly specify implementation defined behaviour. For most cases I

clang c++17 std::vector over aligned types copy of elements SIGSEGV when compiled with -mavx

家住魔仙堡 提交于 2021-01-26 23:28:28
问题 According to this question I thought that in C++17 a std::vector with default allocator should handle over aligned types. However, the following code #include <iostream> #include <iterator> #include <array> #include <vector> template<typename T, size_t N, size_t Alignment> struct alignas(Alignment) AlignedArray : public std::array<T, N> { friend std::ostream& operator<<(std::ostream& o, const AlignedArray& a) { std::copy(a.cbegin(), a.cend(), std::ostream_iterator<T>(o, " ")); return o; } };

clang c++17 std::vector over aligned types copy of elements SIGSEGV when compiled with -mavx

半世苍凉 提交于 2021-01-26 23:28:13
问题 According to this question I thought that in C++17 a std::vector with default allocator should handle over aligned types. However, the following code #include <iostream> #include <iterator> #include <array> #include <vector> template<typename T, size_t N, size_t Alignment> struct alignas(Alignment) AlignedArray : public std::array<T, N> { friend std::ostream& operator<<(std::ostream& o, const AlignedArray& a) { std::copy(a.cbegin(), a.cend(), std::ostream_iterator<T>(o, " ")); return o; } };

clang c++17 std::vector over aligned types copy of elements SIGSEGV when compiled with -mavx

为君一笑 提交于 2021-01-26 23:27:29
问题 According to this question I thought that in C++17 a std::vector with default allocator should handle over aligned types. However, the following code #include <iostream> #include <iterator> #include <array> #include <vector> template<typename T, size_t N, size_t Alignment> struct alignas(Alignment) AlignedArray : public std::array<T, N> { friend std::ostream& operator<<(std::ostream& o, const AlignedArray& a) { std::copy(a.cbegin(), a.cend(), std::ostream_iterator<T>(o, " ")); return o; } };