Skip to content

Commit

Permalink
wrap_symbols.cc修改为放到custom_cxx里
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Aug 13, 2024
1 parent 8be7a56 commit 5502117
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 14 deletions.
3 changes: 2 additions & 1 deletion android_armv7.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
CXX_SETTING="use_custom_libcxx=true"
fi

Expand Down
3 changes: 2 additions & 1 deletion android_armv8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
CXX_SETTING="use_custom_libcxx=true"
fi

Expand Down
3 changes: 2 additions & 1 deletion android_x64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
CXX_SETTING="use_custom_libcxx=true"
fi

Expand Down
3 changes: 2 additions & 1 deletion ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
brew install llvm
export PATH="/usr/local/opt/llvm/bin:$PATH"
CXX_SETTING="use_custom_libcxx=true"
Expand Down
3 changes: 2 additions & 1 deletion linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
sudo apt-get install -y llvm
CXX_SETTING="use_custom_libcxx=true"
fi
Expand Down
3 changes: 2 additions & 1 deletion linux_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
sudo apt-get install -y llvm
CXX_SETTING="use_custom_libcxx=true"
fi
Expand Down
3 changes: 2 additions & 1 deletion macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
brew install llvm
export PATH="/usr/local/opt/llvm/bin:$PATH"
CXX_SETTING="use_custom_libcxx=true"
Expand Down
3 changes: 2 additions & 1 deletion macos_DLL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
brew install llvm
export PATH="/usr/local/opt/llvm/bin:$PATH"
CXX_SETTING="use_custom_libcxx=true libcxx_is_shared=false"
Expand Down
3 changes: 2 additions & 1 deletion macos_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
brew install llvm
export PATH="/usr/local/opt/llvm/bin:$PATH"
CXX_SETTING="use_custom_libcxx=true"
Expand Down
3 changes: 2 additions & 1 deletion macos_arm64_DLL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ CXX_SETTING="use_custom_libcxx=false"

if [ "$NEW_WRAP" == "with_new_wrap" ]; then
echo "=====[ wrap new delete ]====="
node $GITHUB_WORKSPACE/node-script/do-gitpatch.js -p $GITHUB_WORKSPACE/patches/wrap_new_delete_v$VERSION.patch
cp -f $GITHUB_WORKSPACE/node-script/wrap_symbols.cc "third_party/libc++/src/src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
brew install llvm
export PATH="/usr/local/opt/llvm/bin:$PATH"
CXX_SETTING="use_custom_libcxx=true libcxx_is_shared=false"
Expand Down
3 changes: 2 additions & 1 deletion windows_32.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ set "CXX_SETTING=is_clang=false use_custom_libcxx=false"

if "%NEW_WRAP%"=="with_new_wrap" (
echo =====[ wrap new delete ]=====
node %~dp0\node-script\do-gitpatch.js -p %GITHUB_WORKSPACE%\patches\wrap_new_delete_v%VERSION%.patch
copy /Y %~dp0\node-script\wrap_symbols.cc "third_party\libc++\src\src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
set "CXX_SETTING=is_clang=true use_custom_libcxx=true"
)

Expand Down
3 changes: 2 additions & 1 deletion windows_64.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ set "CXX_SETTING=is_clang=false use_custom_libcxx=false"

if "%NEW_WRAP%"=="with_new_wrap" (
echo =====[ wrap new delete ]=====
node %~dp0\node-script\do-gitpatch.js -p %GITHUB_WORKSPACE%\patches\wrap_new_delete_v%VERSION%.patch
copy /Y %~dp0\node-script\wrap_symbols.cc "third_party\libc++\src\src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
set "CXX_SETTING=is_clang=true use_custom_libcxx=true"
)

Expand Down
3 changes: 2 additions & 1 deletion windows_64MD.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ set "CXX_SETTING=is_clang=false use_custom_libcxx=false"

if "%NEW_WRAP%"=="with_new_wrap" (
echo =====[ wrap new delete ]=====
node %~dp0\node-script\do-gitpatch.js -p %GITHUB_WORKSPACE%\patches\wrap_new_delete_v%VERSION%.patch
copy /Y %~dp0\node-script\wrap_symbols.cc "third_party\libc++\src\src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
set "CXX_SETTING=is_clang=true use_custom_libcxx=true"
)

Expand Down
2 changes: 1 addition & 1 deletion windows_64MD_DLL_94.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ set "CXX_SETTING=is_clang=false use_custom_libcxx=false"
if "%NEW_WRAP%"=="with_new_wrap" (
echo =====[ wrap new delete ]=====
copy /Y %~dp0\node-script\wrap_symbols.cc "third_party\libc++\src\src"
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace(/(\/\/third_party\/libc\+\+\/src\/src\/verbose_abort\.cpp.+\,)/g, '$1\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));
node -e "const fs = require('fs'); fs.writeFileSync('buildtools/third_party/libc++/BUILD.gn', fs.readFileSync('buildtools/third_party/libc++/BUILD.gn', 'utf-8').replace('\"//third_party/libc++/src/src/verbose_abort.cpp\",', '\"//third_party/libc++/src/src/verbose_abort.cpp\",\n \"//third_party/libc++/src/src/wrap_symbols.cc\",'));"
set "CXX_SETTING=is_clang=true use_custom_libcxx=true libcxx_is_shared=false"
)

Expand Down

0 comments on commit 5502117

Please sign in to comment.