[cfe-dev] [3.5 Release] test-release.sh intended behaviour (was <cxxabi.h> not found by clang-3.5 rc1 with libc++)

Ben Pope benpope81 at gmail.com
Thu Aug 14 11:36:59 PDT 2014


On Tuesday, August 12, 2014 04:53 PM, Ben Pope wrote:
> Does anybody know if ./llvm.src/utils/release/test-release.sh is
> supposed to build a working libc++?  I thought I read recently that
> libc++abi was made the default when building libc++ in-tree, but perhaps
> that's for clang-3.6.

I've had more luck with cmake, I've used this hack with trunk:
-----
#!/bin/bash

BuildDir="`pwd`"

phase0_dir=/usr
phase1_dir="$BuildDir/Phase1/install"
phase2_dir="$BuildDir/Phase2/install"
phase3_dir="$BuildDir/Phase3/install"

function make_install() {
     local Phase="Phase$1"
     local CompilerDir="$2"
     local PhaseBuildDir="$BuildDir/$Phase/build"
     local PhaseInstallDir="$BuildDir/$Phase/install"
     mkdir -p "$PhaseBuildDir"
     cd "$PhaseBuildDir"
     LIBS=-lc++abi cmake ../../../../llvm 
-DCMAKE_C_COMPILER="$CompilerDir/bin/clang" 
-DCMAKE_CXX_COMPILER="$CompilerDir/bin/clang++" 
-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-stdlib=libc++ 
-DCMAKE_EXE_LINKER_FLAGS=-lc++abi -DCMAKE_INSTALL_PREFIX="$PhaseInstallDir"
     make -j7 && make install
}

make_install 1 $phase0_dir
make_install 2 $phase1_dir
make_install 3 $phase2_dir
cd $BuildDir

-----
Although I'm yet to test it or do anything useful like compare Phase 2 
and 3, but it does seem to produce a clang that can build itself, and 
does use the libc++ and libc++abi from the tree.

It would be cool if anybody feels like cleaning it up or perhaps 
adapting test-release to use cmake, although for 3.5 some cmake build 
changes will be needed for libc++/libc++abi.

Somehow I feel pretty alone on this mission though.

Ben




More information about the cfe-dev mailing list