-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable static PGO for Linux SGX #2270
Enable static PGO for Linux SGX #2270
Conversation
execute_process( | ||
COMMAND bash -c "sed -i -E 's/^WAMR_BUILD_STATIC_PGO = .*/WAMR_BUILD_STATIC_PGO = ${WAMR_BUILD_STATIC_PGO}/g' ${CMAKE_CURRENT_SOURCE_DIR}/enclave-sample/Makefile" | ||
OUTPUT_VARIABLE cmdOutput | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had better handle it like WAMR_BUILD_SGX_IPFS EQUAL
and WAMR_BUILD_LIB_RATS
below. e.g.
if (WAMR_BUILD_STATIC_PGO EQUAL 1)
...
else ()
...
endif ()
if [ "$1" = "--sgx" ] && [ "$PLATFORM" = "linux" ]; then | ||
IWASM="../../../product-mini/platforms/${PLATFORM}-sgx/enclave-sample/iwasm" | ||
WAMRC="${WAMRC} -sgx" | ||
. /opt/intel/sgxsdk/environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add this line, developer may install sgxsdk in other place.
WAMRC="../../../wamr-compiler/build/wamrc" | ||
if [ "$1" = "--sgx" ] && [ "$PLATFORM" = "linux" ]; then | ||
IWASM="../../../product-mini/platforms/${PLATFORM}-sgx/enclave-sample/iwasm" | ||
WAMRC="${WAMRC} -sgx" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had better
if [ "$1" = "--sgx" ]; then
IWASM="$PWD/../../../product-mini/platforms/linux-sgx/enclave-sample/iwasm"
WAMRC="$PWD/../../../wamr-compiler/build/wamrc -sgx"
else
IWASM="$PWD/../../../product-mini/platforms/${PLATFORM}/build/iwasm"
WAMRC="$PWD/../../../wamr-compiler/build/wamrc"
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Enable static PGO for Linux SGX and update the related benchmarks test scripts and documents.
Enable static PGO for Linux SGX
Update related benchmarks test scripts and readmes