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

build in linux with clang toolchain #1789

Merged
merged 1 commit into from
Jul 22, 2023

Conversation

tedli
Copy link
Contributor

@tedli tedli commented Jul 22, 2023

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.

.github/workflows/pika.yml Outdated Show resolved Hide resolved
Signed-off-by: lizhen6 <lizhen6@360.cn>
@@ -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}
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review:

  1. Line 62: In the elseif condition for GNU CXX compiler, it sets CMAKE_CXX_FLAGS with -pthread -Wl,--no-as-needed -ldl. This line seems fine.

  2. Lines 59-61: In the if condition for Clang CXX compiler on Linux, it sets CMAKE_EXE_LINKER_FLAGS and CMAKE_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.

  3. 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.

  4. 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.

@AlexStocks AlexStocks merged commit aeb98fe into OpenAtomFoundation:unstable Jul 22, 2023
9 checks passed
bigdaronlee163 pushed a commit to bigdaronlee163/pika that referenced this pull request Jun 8, 2024
Signed-off-by: lizhen6 <lizhen6@360.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants