-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
build in linux with clang toolchain #1789
Conversation
Signed-off-by: lizhen6 <[email protected]>
@@ -487,6 +488,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux") | |||
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE} | |||
-DGPERFTOOLS_BUILD_STATIC=ON | |||
-DEFAULT_BUILD_MINIMAL=ON | |||
-Dgperftools_build_benchmark=OFF | |||
BUILD_COMMAND | |||
make -j${CPU_CORE} | |||
) |
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.
Code Review:
-
Line 62: In the
elseif
condition for GNU CXX compiler, it setsCMAKE_CXX_FLAGS
with-pthread -Wl,--no-as-needed -ldl
. This line seems fine. -
Lines 59-61: In the
if
condition for Clang CXX compiler on Linux, it setsCMAKE_EXE_LINKER_FLAGS
andCMAKE_CXX_FLAGS
. The changes include adding-stdlib=libc++
and-fuse-ld=lld
, which specify the C++ standard library and linker respectively. These changes should be fine if you intend to use libc++ and lld as the standard library and linker for Clang. -
Lines 223-224: It adds the
--enable-shared=no
flag during the configure step in the Linux section. This flag disables building shared libraries. If this is the desired behavior, then it is fine. -
Lines 487-488: It adds the
-Dgperftools_build_benchmark=OFF
flag during the configuration of GPerftools build on Linux. This flag disables building the benchmark component of GPerftools. If you don't need the benchmark, it is fine.
Overall, the code changes appear reasonable and seem to address specific requirements based on the platforms and dependencies being used. However, without additional context or knowledge of specific bug risks or improvement goals, it is challenging to provide more detailed suggestions.
Signed-off-by: lizhen6 <[email protected]>
Signed-off-by: lizhen6 <[email protected]>
Like #1783 mentioned, build under macos will produce more expressive sanitize log. But not everyone use mac, so it's better to make pika could build using same toolchain like macos do.