/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
eng/common/native/LocateNativeCompiler.targets
27 строк
1 KB
dotnet-maestro[bot]
[main] Source code updates from dotnet/dotnet (#67024)
07 июн 2026, 01:16
Не верифицирован
07 июн 2026, 01:16
7f0d5e9
Код
Авторство
О чём код?
<Project> <!-- Opt-in target to detect compiler/linker from init-compiler.sh and set NativeAOT linker props. Callers enable this by setting UseCommonLocateNativeCompilerTarget=true. --> <Target Name="LocateNativeCompiler" Condition="'$(UseCommonLocateNativeCompilerTarget)' == 'true'" BeforeTargets="SetupOSSpecificProps"> <PropertyGroup> <CppCompilerAndLinker Condition="'$(CppCompilerAndLinker)' == ''">clang</CppCompilerAndLinker> <SysRoot Condition="'$(CrossBuild)' == 'true'">$(ROOTFS_DIR)</SysRoot> </PropertyGroup> <Exec Command="sh -c 'build_arch="$(TargetArchitecture)" compiler="$(CppCompilerAndLinker)" . "$(RepositoryEngineeringDir)/common/native/init-compiler.sh" && echo "$CC;$LDFLAGS"' 2>/dev/null" EchoOff="true" ConsoleToMsBuild="true" StandardOutputImportance="Low"> <Output TaskParameter="ConsoleOutput" PropertyName="_CC_LDFLAGS" /> </Exec> <PropertyGroup> <CppLinker>$(_CC_LDFLAGS.SubString(0, $(_CC_LDFLAGS.IndexOf(';'))))</CppLinker> <_LDFLAGS>$(_CC_LDFLAGS.SubString($([MSBuild]::Add($(_CC_LDFLAGS.IndexOf(';')), 1))))</_LDFLAGS> <LinkerFlavor Condition="$(_LDFLAGS.Contains('lld'))">lld</LinkerFlavor> </PropertyGroup> </Target> </Project>