Skip to content

Commit

Permalink
compile plugin so with static libstdc++ and libgcc
Browse files Browse the repository at this point in the history
  • Loading branch information
ljcui committed Dec 17, 2024
1 parent 2518337 commit a54198b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion procedures/make_custom_so_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LIBLGRAPH="../build/output/liblgraph.so"


if [[ "$OSTYPE" == "linux-gnu"* ]]; then
g++ -fno-gnu-unique -fPIC -g --std=c++17 -I$INCLUDE_DIR -rdynamic -O3 -fopenmp -o ${APP}.so $PROCEDURE_PATH/${APP}_procedure.cpp $APP_PATH/${APP}_core.cpp $LIBLGRAPH -shared
g++ -fno-gnu-unique -fPIC -g --std=c++17 -I$INCLUDE_DIR -rdynamic -O3 -fopenmp -static-libstdc++ -static-libgcc -o ${APP}.so $PROCEDURE_PATH/${APP}_procedure.cpp $APP_PATH/${APP}_core.cpp $LIBLGRAPH -shared
elif [[ "$OSTYPE" == "darwin"* ]]; then
clang++ -stdlib=libc++ -fPIC -g --std=c++17 -I$INCLUDE_DIR -rdynamic -O3 -Xpreprocessor -fopenmp -lomp -o ${APP}.so $PROCEDURE_PATH/${APP}_procedure.cpp $APP_PATH/${APP}_core.cpp $LIBLGRAPH -shared
fi
2 changes: 1 addition & 1 deletion procedures/make_so_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LIBLGRAPH="../build/output/liblgraph.so"


if [[ "$OSTYPE" == "linux-gnu"* ]]; then
g++ -fno-gnu-unique -fPIC -g --std=c++17 -I$INCLUDE_DIR -rdynamic -O3 -fopenmp -o ${APP}.so $APP_PATH/${APP}_procedure.cpp $APP_PATH/${APP}_core.cpp $LIBLGRAPH -shared
g++ -fno-gnu-unique -fPIC -g --std=c++17 -I$INCLUDE_DIR -rdynamic -O3 -fopenmp -static-libstdc++ -static-libgcc -o ${APP}.so $APP_PATH/${APP}_procedure.cpp $APP_PATH/${APP}_core.cpp $LIBLGRAPH -shared
elif [[ "$OSTYPE" == "darwin"* ]]; then
clang++ -stdlib=libc++ -fPIC -g --std=c++17 -I$INCLUDE_DIR -rdynamic -O3 -Xpreprocessor -fopenmp -lomp -o ${APP}.so $APP_PATH/${APP}_procedure.cpp $APP_PATH/${APP}_core.cpp $LIBLGRAPH -shared
fi

0 comments on commit a54198b

Please sign in to comment.