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

Refactor cmake scripts and support LTO #232

Merged
merged 29 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cffc5e1
Vendorize re2 and utf8proc
Anilm3 Nov 13, 2023
267a388
Fixes
Anilm3 Nov 13, 2023
c7dbe23
Remove unnecessary re2 deps and accidental flto
Anilm3 Nov 13, 2023
0ec169f
Add NOMINMAX on windows
Anilm3 Nov 13, 2023
cc1fc9d
Remove unnecessary post build steps on windows and macos
Anilm3 Nov 13, 2023
7180d0b
Build with -flto
Anilm3 Nov 13, 2023
bcb2d52
Upgrade llvm version for fuzzing and lint
Anilm3 Nov 13, 2023
0ee5e9f
Pass -flto around
Anilm3 Nov 13, 2023
b5a35c1
Fix format
Anilm3 Nov 13, 2023
8be30ca
Split static and shared builds to enable LTO
Anilm3 Nov 13, 2023
d04c92e
Fixes
Anilm3 Nov 13, 2023
3bc1149
Fixes
Anilm3 Nov 13, 2023
952d895
Fixes and improvements
Anilm3 Nov 14, 2023
fa8b7fc
Remove stray statement
Anilm3 Nov 14, 2023
7da47ab
Small fixes
Anilm3 Nov 14, 2023
0051715
Merge branch 'master' into anilm3/lto
Anilm3 Nov 15, 2023
8d6c1df
Merge branch 'master' into anilm3/lto
Anilm3 Nov 16, 2023
e1d5d7a
Update yaml_helpers.cpp
Anilm3 Nov 16, 2023
4360c49
Remove stray statement
Anilm3 Nov 16, 2023
2b1d72f
Minor changes
Anilm3 Nov 16, 2023
dea91f8
Add /MTd for debug on windows
Anilm3 Nov 16, 2023
89fe777
Propagate exec linker flags
Anilm3 Nov 16, 2023
9617ef5
Fix generator expressions
Anilm3 Nov 16, 2023
014a9dd
Add glibc-compat dependency to libddwaf_static
Anilm3 Nov 16, 2023
0e1800e
Merge branch 'master' into anilm3/lto
Anilm3 Nov 20, 2023
6ff5422
Merge branch 'master' into anilm3/lto
Anilm3 Nov 21, 2023
2a54875
Use PROJECT_VERSION for version
Anilm3 Nov 21, 2023
41eaf8e
Address review comments
Anilm3 Nov 22, 2023
025e15d
Revert windows RelWithDebInfo change
Anilm3 Nov 22, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: |
set -ex
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake .. -DCMAKE_BUILD_TYPE=Release -DLIBDDWAF_ENABLE_LTO=ON
VERBOSE=1 make -j benchmark benchcmp

- name: Run Benchmark
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
- name: Install deps
run: |
DEBIAN_FRONTEND="noninteractive" sudo apt-get -y remove python3-lldb-14
sudo .github/workflows/scripts/llvm.sh 15
DEBIAN_FRONTEND="noninteractive" sudo apt-get -y install libfuzzer-15-dev
sudo .github/workflows/scripts/llvm.sh 17
DEBIAN_FRONTEND="noninteractive" sudo apt-get -y install libfuzzer-17-dev

- name: Build
run: ./fuzzing/build.sh
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/scripts/llvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ usage() {
exit 1;
}

CURRENT_LLVM_STABLE=16
CURRENT_LLVM_STABLE=17
BASE_URL="http://apt.llvm.org"

# Check for required tools
Expand Down Expand Up @@ -125,7 +125,8 @@ LLVM_VERSION_PATTERNS[13]="-13"
LLVM_VERSION_PATTERNS[14]="-14"
LLVM_VERSION_PATTERNS[15]="-15"
LLVM_VERSION_PATTERNS[16]="-16"
LLVM_VERSION_PATTERNS[17]=""
LLVM_VERSION_PATTERNS[17]="-17"
LLVM_VERSION_PATTERNS[18]=""

if [ ! ${LLVM_VERSION_PATTERNS[$LLVM_VERSION]+_} ]; then
echo "This script does not support LLVM version $LLVM_VERSION"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,16 @@ jobs:
- name: Install clang-{tidy,format}
run: |
DEBIAN_FRONTEND="noninteractive" sudo apt-get -y remove python3-lldb-14
sudo .github/workflows/scripts/llvm.sh 15
sudo apt-get install -y clang-tidy-15 clang-format-15
sudo .github/workflows/scripts/llvm.sh 17
sudo apt-get install -y clang-tidy-17 clang-format-17

- name: CMake
env:
CXX: clang++-15
CC: clang-15
CXX: clang++-17
CC: clang-17
run: |
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCLANG_TIDY=/usr/bin/run-clang-tidy-15 \
-DCLANG_FORMAT=/usr/bin/clang-format-15
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCLANG_TIDY=/usr/bin/run-clang-tidy-17 \
-DCLANG_FORMAT=/usr/bin/clang-format-17
working-directory: Debug

- name: Build
Expand Down
Loading