From b19a07cff95d745128b93368e0658fc25769beb6 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Mon, 30 Oct 2023 14:52:45 -0700 Subject: [PATCH] Use libc++ in Ubuntu Clang Build (#1440) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: An ubuntu-latest image update caused build failures, where GTest importing chrono headers caused an error inside of stdlib++ when being compiled by Clang. This switches to explicitly asking for libc++ (LLVM stdlib) in the reference Ubuntu Clang build instead of stdlibc++ (GCC stdlib). We don’t force this in CMake logic, to not force a specific stdlib for users compiling Yoga alongside other libraries. E.g. https://github.com/facebookexperimental/libunifex/issues/86 Pull Request resolved: https://github.com/facebook/yoga/pull/1440 Reviewed By: joevilches Differential Revision: D50790965 Pulled By: NickGerleman fbshipit-source-id: fe525cfb4385a9a5ae6a02fcbc6decad0e07ff6e --- .github/actions/setup-cpp/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/setup-cpp/action.yml b/.github/actions/setup-cpp/action.yml index c6f0ed0b73..4f6182674d 100644 --- a/.github/actions/setup-cpp/action.yml +++ b/.github/actions/setup-cpp/action.yml @@ -18,6 +18,8 @@ runs: run: | echo "CC=/usr/bin/clang" >> $GITHUB_ENV echo "CXX=/usr/bin/clang++" >> $GITHUB_ENV + echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV + echo "LDFLAGS=-stdlib=libc++" >> $GITHUB_ENV - name: Set GCC as compiler if: ${{ inputs.toolchain == 'GCC' }}