Skip to content

Commit

Permalink
Use libc++ 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
sytelus committed Jul 18, 2017
1 parent 3465f07 commit 3f9ea6d
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 14 deletions.
Empty file modified Unreal/Environments/Blocks/clean.sh
100644 → 100755
Empty file.
17 changes: 12 additions & 5 deletions Unreal/Environments/Blocks/update_from_git.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
scr_dir=`realpath $0`
rsync -a --delete ../../Plugins/AirSim Plugins/AirSim
robocopy /MIR ..\..\Plugins\AirSim Plugins\AirSim /XD temp *. /njh /njs /ndl /np
robocopy /MIR ..\..\..\AirLib Plugins\AirSim\Source\AirLib /XD temp *. /njh /njs /ndl /np
#! /bin/bash

pause
# get path of current script: https://stackoverflow.com/a/39340259/207661
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR"

set -e
set +x

rsync -a --exclude 'temp' --delete ../../Plugins/AirSim Plugins/AirSim
rsync -a --exclude 'temp' --delete ../../../AirLib Plugins/AirSim/Source/AirLib

popd
Empty file modified clean.sh
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions cmake/cmake-modules/CommonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ macro(CommonSetup)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__CLANG__")
else ()
##TODO: Werror removed temporarily. It should be added back after Linux build is stable
# other flags used in Unreal: -funwind-tables -fdiagnostics-format=msvc -fno-inline -fno-omit-frame-pointer -fstack-protector -O2
set(CMAKE_CXX_FLAGS "-std=c++14 -ggdb -Wall -Wextra -Wstrict-aliasing -Wunreachable-code -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Wno-variadic-macros -Wno-parentheses -fdiagnostics-show-option ${MAVLINK_OVERRIDES} ${AIRLIB_OVERRIDES} ${RPC_LIB_DEFINES} ${CMAKE_CXX_FLAGS}")

if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
Expand Down
26 changes: 17 additions & 9 deletions cmake/getlibcxx.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
#! /bin/bash
#! /bin/bash

set +x
set -e

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
pushd "$SCRIPT_DIR"

# add llvm-source to root of AirSim
cd ..

# Checkout LLVM sources
git clone --depth=1 https://github.com/llvm-mirror/llvm.git llvm-source
git clone --depth=1 https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx
git clone --depth=1 https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi
# git clone --depth=1 -b release_39 https://github.com/llvm-mirror/llvm.git llvm-source
# git clone --depth=1 -b release_39 https://github.com/llvm-mirror/libcxx.git llvm-source/projects/libcxx
# git clone --depth=1 -b release_39 https://github.com/llvm-mirror/libcxxabi.git llvm-source/projects/libcxxabi

# Build and install libc++
rm -rf llvm-build
mkdir llvm-build && cd llvm-build

export C_COMPILER=clang
export COMPILER=clang++

# Build and install libc++
mkdir llvm-build && cd llvm-build
cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${COMPILER} \
-DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr \
../llvm-source
make cxx
sudo make install-cxxabi install-cxx
../llvm-source
make cxx

sudo make install-libcxx install-libcxxabi

popd
12 changes: 12 additions & 0 deletions cmake/getlibcxx_clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/bash

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pushd "$SCRIPT_DIR"

# add llvm-source to root of AirSim
cd ..

rm -rf llvm-source
rm -rf llvm-build

popd

0 comments on commit 3f9ea6d

Please sign in to comment.