Skip to content

Commit

Permalink
Install and force libc++ for the OSS build
Browse files Browse the repository at this point in the history
  • Loading branch information
mszabo-wikia committed Jan 6, 2025
1 parent 654aba9 commit 8ce6dcf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
chmod +x llvm.sh
# Note: Keep this version in sync with the one in the Debian control file.
./llvm.sh ${CLANG_VERSION}
# Manually install libc++ as well.
# Don't use ./llvm.sh ${CLANG_VERSION} all to avoid pulling in a broken libunwind.
apt-get install -y libc++-${CLANG_VERSION}-dev libc++abi-${CLANG_VERSION}-dev
- name: Making LLVM the default compiler
run: |
if [ -f /etc/alternatives/cc ]
Expand Down
2 changes: 2 additions & 0 deletions CMake/HPHPCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQU

if(CLANG_FORCE_LIBSTDCXX)
list(APPEND GENERAL_CXX_OPTIONS "stdlib=libstdc++")
elseif(CLANG_FORCE_LIBCPP)
list(APPEND GENERAL_CXX_OPTIONS "stdlib=libc++")
endif()
else() # using GCC
list(APPEND DISABLED_NAMED_WARNINGS
Expand Down
1 change: 1 addition & 0 deletions ci/ubuntu-20.04-focal/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ override_dh_auto_configure:
-DCMAKE_INSTALL_PREFIX=/opt/hhvm/$(DEB_VERSION_UPSTREAM) \
-DMYSQL_UNIX_SOCK_ADDR=/var/run/mysqld/mysqld.sock \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCLANG_FORCE_LIBCPP=On \
-DFORCE_BUNDLED_LZ4=Off \
-DENABLE_EXTENSION_MCRYPT=Off \
-DENABLE_EXTENSION_ASYNC_MYSQL=Off \
Expand Down

0 comments on commit 8ce6dcf

Please sign in to comment.