Skip to content

Commit

Permalink
[clang] make copying of __config_site less error-prone
Browse files Browse the repository at this point in the history
Reviewed By: skcho

Differential Revision: D40756875

fbshipit-source-id: 3491508048f9f150f2d9b9bdbc4ca447cafc36ae
  • Loading branch information
martintrojer authored and facebook-github-bot committed Oct 27, 2022
1 parent d8b79c4 commit 08f19f3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions facebook-clang-plugins/clang/setup.sh
Expand Up @@ -259,9 +259,10 @@ $BUILD_BIN $BUILD_ARGS install
popd # build
popd # $TMP

# On Linux, copy __config_site to install dirctory. This way we don't need additional -I statements
if [ "$PLATFORM" = "Linux" ]; then
cp -f "$CLANG_PREFIX/include/x86_64-unknown-linux-gnu/c++/v1/__config_site" "$CLANG_PREFIX/include/c++/v1/__config_site"
# On Linux, copy __config_site to install directory. This way we don't need additional -I statements
CONFIG_SITE="$CLANG_PREFIX/include/x86_64-unknown-linux-gnu/c++/v1/__config_site"
if [[ "$PLATFORM" = "Linux" ]] && [[ -f "$CONFIG_SITE" ]]; then
cp -f "$CONFIG_SITE" "$CLANG_PREFIX/include/c++/v1/__config_site"
fi

# delete libs not needed by Infer
Expand Down

0 comments on commit 08f19f3

Please sign in to comment.