-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from All-Your-Locks-Are-Belong-To-Us/fix/linke…
…r-map-generation Fix Linker Map Generation For macOS
- Loading branch information
Showing
3 changed files
with
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
set(command ${CMAKE_C_COMPILER} ${flags} -Wl,--version) | ||
|
||
|
||
function(add_linker_map_for_target TARGET) | ||
if (APPLE) | ||
# LLVM only understands this flag. | ||
# The map output differs from GNU ld. | ||
target_link_options(${TARGET} PRIVATE "-Wl,-map,${TARGET}.map") | ||
else() | ||
target_link_options(${TARGET} PRIVATE "-Wl,-Map=${TARGET}.map") | ||
endif() | ||
endfunction() |
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