[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 9 09:38:48 PDT 2016


jlebar added a comment.

Although these pass the CUDA test-suite tests (which I haven't yet committed because they're broken without this change), I could use some help running the libcxx tests.

I cannot find any documentation explaining how to run the libcxx tests with just-built clang.  Presumably this is supported and I just cannot figure it out.  Anyway I figured I'd try to make a new objdir and point it to my just-built clang.

  $ mkdir objdir-libcxx
  $ cd objdir-libcxx
  $ cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$HOME/llvm/release/bin/clang -DCMAKE_CXX_COMPILER=$HOME/llvm/release/bin/clang -DLLVM_ENABLE_ASSERTIONS=On ../llvm

This also doesn't work.  Building one of cmake's atomic tests fails with linker errors.

  Run Build Command:"/usr/local/google/home/jlebar/bin/ninja" "cmTC_0c40a"
  [1/2] Building CXX object CMakeFiles/cmTC_0c40a.dir/src.cxx.o
  [2/2] Linking CXX executable cmTC_0c40a
  FAILED: cmTC_0c40a
  : && /usr/local/google/home/jlebar/llvm/release/bin/clang   -DHAVE_CXX_ATOMICS_WITH_LIB -std=c++11   CMakeFiles/cmTC_0c40a.dir/src.cxx.o  -o cmTC_0c40a  -lm -latomic && :
  CMakeFiles/cmTC_0c40a.dir/src.cxx.o:src.cxx:function __clang_call_terminate: error: undefined reference to '__cxa_begin_catch'
  CMakeFiles/cmTC_0c40a.dir/src.cxx.o:src.cxx:function __clang_call_terminate: error: undefined reference to 'std::terminate()'
  CMakeFiles/cmTC_0c40a.dir/src.cxx.o(.eh_frame+0x143): error: undefined reference to '__gxx_personality_v0'
  clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.
  
  Source file was:
  
  #include <atomic>
  std::atomic<int> x;
  int main() {
    return x;
  }

I presume there is some Right Way to do this, and I'm just not doing it.


https://reviews.llvm.org/D25403





More information about the cfe-commits mailing list