Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Prefer gold linker on linux
  • Loading branch information
am11 authored Mar 16, 2023
commit fb04e3f082ea1b0354b20fcc33deff5501143416
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,21 @@ The .NET Foundation licenses this file to you under the MIT license.
<Error Condition="'$(_WhereLinker)' != '0' and '$(CppCompilerAndLinkerAlternative)' == '' and '$(_IsApplePlatform)' != 'true'"
Text="Requested linker ('$(CppLinker)') not found in PATH." />

<![CDATA[
Testing if gold linker is available:
! echo "" | cc -xc -fuse-ld=gold - 2>&1 | grep -qE "fuse-ld=gold|'ld'"
]]>
<Exec Command="! echo &quot;&quot; | &quot;$(CppLinker)&quot; -xc -fuse-ld=gold - 2&gt;&amp;1 | grep -qE &quot;fuse-ld=gold|'ld'&quot;"
Condition="'$(UseLlvmLinker)' != 'true' and '$(_targetOS)' == 'linux'"
IgnoreExitCode="true"
StandardOutputImportance="Low">
<Output TaskParameter="ExitCode" PropertyName="_GoldLinkerSupportedExitCode" />
</Exec>

<ItemGroup>
<LinkerArg Include="-fuse-ld=gold" Condition="'$(_GoldLinkerSupportedExitCode)' == '0'" />
</ItemGroup>

<Exec Command="command -v &quot;$(ObjCopyName)&quot;" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(_IsApplePlatform)' != 'true' and '$(StripSymbols)' == 'true'">
<Output TaskParameter="ExitCode" PropertyName="_WhereSymbolStripper" />
</Exec>
Expand Down