From fb04e3f082ea1b0354b20fcc33deff5501143416 Mon Sep 17 00:00:00 2001
From: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Date: Fri, 17 Mar 2023 00:38:18 +0200
Subject: [PATCH 1/7] Prefer gold linker on linux
---
.../Microsoft.NETCore.Native.Unix.targets | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
index 4e18bb39e7f361..555c4fe60e90ea 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
@@ -190,6 +190,21 @@ The .NET Foundation licenses this file to you under the MIT license.
+ &1 | grep -qE "fuse-ld=gold|'ld'"
+ ]]>
+
+
+
+
+
+
+
+
From 37455496852806edd224ef954238863aaab25c89 Mon Sep 17 00:00:00 2001
From: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Date: Fri, 17 Mar 2023 01:28:22 +0200
Subject: [PATCH 2/7] Fix comment
---
.../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
index 555c4fe60e90ea..5a99650b3e0247 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
@@ -190,10 +190,10 @@ The .NET Foundation licenses this file to you under the MIT license.
- &1 | grep -qE "fuse-ld=gold|'ld'"
- ]]>
+ -->
Date: Fri, 17 Mar 2023 08:24:24 +0200
Subject: [PATCH 3/7] Try without gc-sections
---
.../nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
index cf8f7e8805af0e..d4721c9476b42e 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
@@ -315,7 +315,7 @@ The .NET Foundation licenses this file to you under the MIT license.
-
+
From 4e6bc060142702e51a114183b2248d5442cf5e17 Mon Sep 17 00:00:00 2001
From: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Date: Fri, 17 Mar 2023 10:58:49 +0200
Subject: [PATCH 4/7] Add ability to specify linker via -p:LinkerFlavor
---
.../Microsoft.NETCore.Native.Unix.targets | 20 +++++++++----------
.../Microsoft.NETCore.Native.targets | 2 +-
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
index 5a99650b3e0247..4d42157fc61b60 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
@@ -21,7 +21,8 @@ The .NET Foundation licenses this file to you under the MIT license.
ar
--flat
<_SymbolPrefix Condition="'$(_IsApplePlatform)' == 'true'">_
- true
+ lld
+ bfd
@@ -112,7 +113,7 @@ The .NET Foundation licenses this file to you under the MIT license.
-
+
@@ -148,8 +149,7 @@ The .NET Foundation licenses this file to you under the MIT license.
-
-
+
@@ -191,18 +191,18 @@ The .NET Foundation licenses this file to you under the MIT license.
Text="Requested linker ('$(CppLinker)') not found in PATH." />
-
-
+
-
+
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
index d4721c9476b42e..c297b75546e60d 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
@@ -315,7 +315,7 @@ The .NET Foundation licenses this file to you under the MIT license.
-
+
From 0f9768f8b874481dcfb6e744e314268daf0c4b7c Mon Sep 17 00:00:00 2001
From: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Date: Fri, 17 Mar 2023 11:08:29 +0200
Subject: [PATCH 5/7] =?UTF-8?q?Straighten=20out=20the=20spaghetti=20?=
=?UTF-8?q?=F0=9F=8D=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Microsoft.NETCore.Native.Unix.targets | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
index 4d42157fc61b60..8f270d1793ad67 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
@@ -149,7 +149,7 @@ The .NET Foundation licenses this file to you under the MIT license.
-
+
@@ -190,21 +190,6 @@ The .NET Foundation licenses this file to you under the MIT license.
-
-
-
-
-
-
-
-
-
From 94a9950166ad554b4851bbf937a71e7cb5e11aae Mon Sep 17 00:00:00 2001
From: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Date: Fri, 17 Mar 2023 11:08:52 +0200
Subject: [PATCH 6/7] Switch to gold and see what breaks
---
.../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
index 8f270d1793ad67..d8b6b22897f25b 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
@@ -22,7 +22,7 @@ The .NET Foundation licenses this file to you under the MIT license.
--flat
<_SymbolPrefix Condition="'$(_IsApplePlatform)' == 'true'">_
lld
- bfd
+ gold
From a41d903bae9644a603475195e34d1ac799bf7dbc Mon Sep 17 00:00:00 2001
From: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Date: Fri, 17 Mar 2023 13:30:10 +0200
Subject: [PATCH 7/7] Set linux default to bfd
---
.../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
index d8b6b22897f25b..8f270d1793ad67 100644
--- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
+++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets
@@ -22,7 +22,7 @@ The .NET Foundation licenses this file to you under the MIT license.
--flat
<_SymbolPrefix Condition="'$(_IsApplePlatform)' == 'true'">_
lld
- gold
+ bfd