Skip to content
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

feat: support rtti and different projects for llvm build #32

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/actions/build-llvm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ inputs:
description: "Enable coverage."
required: false
default: 'false'
llvm-projects:
description: "LLVM projects to build. Sets up LLVM_ENABLE_PROJECTS variable."
required: false
default: ''
sanitizer:
description: 'A sanitizer to build LLVM with. Possible values are Address, Memory, MemoryWithOrigins, Undefined, Thread, DataFlow, and Address;Undefined'
required: false
Expand All @@ -28,6 +32,10 @@ inputs:
description: 'Enable Valgrind for LLVM regression tests.'
required: false
default: 'false'
enable-rtti:
description: 'Enable RTTI for LLVM.'
required: false
default: 'false'
default-target-triple:
description: 'Default target to triple build LLVM for. Possible values are `eravm`, `evm`, or leave empty for default target.'
required: false
Expand All @@ -51,7 +59,7 @@ inputs:
llvm-builder-version:
description: 'Version of the LLVM builder to use.'
required: false
default: '1.0.34'
default: '1.0.35'
ccache-key:
description: 'Github Actions cache key for CCache.'
required: false
Expand Down Expand Up @@ -152,6 +160,8 @@ runs:
[ "${{ inputs.enable-tests }}" = "true" ] && ENABLE_TESTS="--enable-tests"
[ "${{ inputs.enable-assertions }}" = "true" ] && ENABLE_ASSERTIONS="--enable-assertions"
[ "${{ inputs.enable-coverage }}" = "true" ] && ENABLE_COVERAGE="--enable-coverage"
[ "${{ inputs.llvm-projects }}" != "" ] && LLVM_PROJECTS="--llvm-projects ${{ inputs.llvm-projects }}"
[ "${{ inputs.enable-rtti }}" = "true" ] && ENABLE_RTTI="--enable-rtti"
[ "${{ inputs.extra-args }}" != "" ] && EXTRA_ARGS="--extra-args ${{ inputs.extra-args }}"
[ "${{ inputs.sanitizer }}" != "" ] && SANITIZER="--sanitizer ${{ inputs.sanitizer }}"
[ "${{ inputs.enable-valgrind }}" = "true" ] && ENABLE_VALGRIND="--enable-valgrind"
Expand All @@ -160,4 +170,4 @@ runs:
fi

zksync-llvm build --target-env ${{ inputs.target-env }} ${DEFAULT_TARGET} \
--use-ccache ${{ inputs.builder-extra-args }} ${DEBUG_ARG} ${ENABLE_TESTS} ${ENABLE_VALGRIND} ${ENABLE_ASSERTIONS} ${ENABLE_COVERAGE} ${SANITIZER} ${EXTRA_ARGS}
--use-ccache ${{ inputs.builder-extra-args }} ${DEBUG_ARG} ${ENABLE_TESTS} ${ENABLE_VALGRIND} ${ENABLE_ASSERTIONS} ${ENABLE_COVERAGE} ${LLVM_PROJECTS} ${ENABLE_RTTI} ${SANITIZER} ${EXTRA_ARGS}