-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Fix Tizen linking flags used during ILCompiler build #129844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -64,6 +64,16 @@ The .NET Foundation licenses this file to you under the MIT license. | |
| <Output TaskParameter="ExitCode" PropertyName="_IsAlpineExitCode" /> | ||
| </Exec> | ||
|
|
||
| <!-- tizen's gcc toolchain needs extra linker args --> | ||
| <Exec Command="test -f "$(SysRoot)/etc/os-release" && grep -q ID=tizen "$(SysRoot)/etc/os-release"" IgnoreExitCode="true" StandardOutputImportance="Low" Condition="'$(SysRoot)' != ''"> | ||
| <Output TaskParameter="ExitCode" PropertyName="_IsTizenExitCode" /> | ||
| </Exec> | ||
|
|
||
| <PropertyGroup Condition="'$(_IsTizenExitCode)' == '0'"> | ||
| <_TizenToolchainLibDir>lib</_TizenToolchainLibDir> | ||
| <_TizenToolchainLibDir Condition="'$(_targetArchitecture)' == 'arm64' or '$(_targetArchitecture)' == 'x64' or '$(_targetArchitecture)' == 'riscv64'">lib64</_TizenToolchainLibDir> | ||
| </PropertyGroup> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetTriple /> | ||
| <TargetTriple Condition="'$(CrossCompileArch)' != '' and '$(_IsAlpineExitCode)' != '0'">$(CrossCompileArch)-linux-$(CrossCompileAbi)</TargetTriple> | ||
|
|
@@ -296,6 +306,9 @@ The .NET Foundation licenses this file to you under the MIT license. | |
| This is required only for 64-bit binaries. | ||
| --> | ||
| <LinkerArg Include="-Wl,-z,max-page-size=16384" Condition=" '$(_linuxLibcFlavor)' == 'bionic' and '$(NativeLib)' == 'Shared' and ('$(_targetArchitecture)' == 'x64' or '$(_targetArchitecture)' == 'arm64')" /> | ||
|
|
||
| <!-- Tizen requires additional linker args --> | ||
| <LinkerArg Include="-L"$(SysRoot)/$(_TizenToolchainLibDir)"" Condition="'$(_IsTizenExitCode)' == '0'" /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these things really necessary? We have not been passing standard library paths in other platforms. We pass
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some of these maybe necessary, since Tizen might not be using regular/defacto locations in some cases (clang defines them at: https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Gnu.cpp). @gbalykov, could you please try removing a line, then publish an app on armv7l, arm64 and x64 to see if that line was needed; rinse and repeat to minimize this patch? Typically we only need a few linker related args not everything which was needed to build runtime repo.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've minimized the patch keeping only what's required. Checked this on runtime build, no issues. Sysroot is passed even without this change, but that's not enough. |
||
| </ItemGroup> | ||
|
|
||
| <Exec Command="xcodebuild -version" Condition="'$(_IsApplePlatform)' == 'true' and '$(UseLdClassicXCodeLinker)' == ''" IgnoreExitCode="true" StandardOutputImportance="Low" ConsoleToMSBuild="true"> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.