From d877b6b7f4ca085d87ce225b1f31fe45e4b47c45 Mon Sep 17 00:00:00 2001 From: rina Date: Thu, 4 Apr 2024 16:45:22 +1000 Subject: [PATCH] compile speedups with clang+lld --- offlineASL-cpp/build.sh | 2 +- offlineASL-cpp/meson.build | 4 +++- .../subprojects/aslp-lifter-instantiate/pch/cpp_pch.hpp | 1 + offlineASL-cpp/subprojects/aslp-lifter/src/dummy.cpp | 3 --- 4 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 offlineASL-cpp/subprojects/aslp-lifter/src/dummy.cpp diff --git a/offlineASL-cpp/build.sh b/offlineASL-cpp/build.sh index f22cb990..42da6417 100755 --- a/offlineASL-cpp/build.sh +++ b/offlineASL-cpp/build.sh @@ -7,7 +7,7 @@ dir="$(dirname "$0")" cd "$dir" # echo ":gen A64 aarch64.+ cpp ./subprojects" | dune exec asli -meson setup --reconfigure build +CXX=$(which clang++) CXX_LD=$(which ld.lld) meson setup --reconfigure build pushd build meson compile DESTDIR=$(pwd)/prefix meson install diff --git a/offlineASL-cpp/meson.build b/offlineASL-cpp/meson.build index e81190d3..da5bb11f 100644 --- a/offlineASL-cpp/meson.build +++ b/offlineASL-cpp/meson.build @@ -4,7 +4,9 @@ project('offlineasl', 'cpp', 'warning_level=3', 'cpp_std=c++20', 'buildtype=debug', - 'strip=true', + # 'optimization=1', # slow and increases file size? + # 'b_lto=true', # too slow + # 'b_lto_mode=thin', ] ) diff --git a/offlineASL-cpp/subprojects/aslp-lifter-instantiate/pch/cpp_pch.hpp b/offlineASL-cpp/subprojects/aslp-lifter-instantiate/pch/cpp_pch.hpp index 2c78aed1..fabe7098 100644 --- a/offlineASL-cpp/subprojects/aslp-lifter-instantiate/pch/cpp_pch.hpp +++ b/offlineASL-cpp/subprojects/aslp-lifter-instantiate/pch/cpp_pch.hpp @@ -5,3 +5,4 @@ #include #include #include +#include diff --git a/offlineASL-cpp/subprojects/aslp-lifter/src/dummy.cpp b/offlineASL-cpp/subprojects/aslp-lifter/src/dummy.cpp deleted file mode 100644 index 16db28ed..00000000 --- a/offlineASL-cpp/subprojects/aslp-lifter/src/dummy.cpp +++ /dev/null @@ -1,3 +0,0 @@ -int main() { - return 1; -}