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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build GIE ffi wrapper using clang with llvm LTO. #254

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions interactive_engine/src/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ members = [
"Pegasus",
]

[build]
rustflags = [
"-C", "linker-plugin-lto",
"-C", "linker=clang",
"-C", "link-arg=-fuse-ld=lld",
]

[profile.release]
opt-level = 3
debug = true
Expand Down
2 changes: 2 additions & 0 deletions interactive_engine/src/executor/runtime/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ use std::env;

fn main() {
let dst = Config::new("native")
.define("CMAKE_C_COMPILER", "clang")
.define("CMAKE_CXX_COMPILER", "clang++")
.build_target("native_store")
.build();

Expand Down
5 changes: 3 additions & 2 deletions interactive_engine/src/executor/runtime/native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ macro(install_vineyard_target target)
)
endmacro()

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wall -Wno-deprecated-declarations")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -flto=thin -fuse-ld=lld")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=thin -fuse-ld=lld -std=c++14 -Wall -Wno-deprecated-declarations")
set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -Wl,-fuse-ld=lld")

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
Expand Down