-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) 2023 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
# | ||
|
||
find_program (MOLD NAMES "mold") | ||
if (NOT MOLD) | ||
message(FATAL_ERROR "Could not find the mold linker") | ||
endif() | ||
|
||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1.0) | ||
get_filename_component(MOLD_PATH ${MOLD} DIRECTORY) | ||
nebula_add_exe_linker_flag(-B${MOLD_PATH}/../libexec/mold) | ||
nebula_add_shared_linker_flag(-B${MOLD_PATH}/../libexec/mold) | ||
else() | ||
nebula_add_exe_linker_flag(-fuse-ld=mold) | ||
nebula_add_shared_linker_flag(-fuse-ld=mold) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters