Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
publicarray committed Apr 11, 2021
1 parent 71e3858 commit 787fc01
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions cross/fish/patches/001-cmake-remove-gold-linker.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
--- fish-3.2.0/CMakeLists.txt 2021-03-01 23:47:02.000000000 +1100
+++ ./CMakeLists.txt 2021-04-10 13:12:07.280990507 +1000
@@ -55,19 +55,19 @@ add_compile_options(-fno-exceptions)
@@ -51,22 +51,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
# Disable exception handling.
add_compile_options(-fno-exceptions)

# Prefer lld or the gold linker because they don't emit useless warnings about sys_nerr and
# _sys_errlist. They're also faster (significantly so in the case of lld).
-# Prefer lld or the gold linker because they don't emit useless warnings about sys_nerr and
-# _sys_errlist. They're also faster (significantly so in the case of lld).
-if (UNIX)
- execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version
- ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
Expand All @@ -17,19 +19,6 @@
- endif()
- endif()
-endif()
+# if (UNIX)
+# execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=lld -Wl,--version
+# ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
+# if ("${LD_VERSION}" MATCHES "LLD ")
+# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
+# elseif (NOT APPLE)
+# execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version
+# ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
+# if ("${LD_VERSION}" MATCHES "GNU gold")
+# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
+# endif()
+# endif()
+# endif()

-
# Hide the CMake Rules directories in Xcode projects.
source_group("CMake Rules" REGULAR_EXPRESSION "^$")

0 comments on commit 787fc01

Please sign in to comment.