Skip to content

Conversation

@rolfbjarne
Copy link
Member

Quite often customers need to pass custom arguments to the native linker.

Until now we haven't had an official way of doing this, besides the rather clunky:

<AppBundleExtraOptions>$(AppBundleExtraOptions) --gcc_flags '...'</AppBundleExtraOptions>

So add support for the LinkerArgument item group, which will now serve this purpose.

A code search on GitHub for '<LinkerArgument' shows exactly 1 result, which
seems to be unrelated (it's for Java code), so hopefully no existing projects
will already have 'LinkerArguments' set.

Fixes #21331.

…uments to the native linker. Fixes #21331.

Quite often customers need to pass custom arguments to the native linker.

Until now we haven't had an official way of doing this, besides the rather clunky:

```xml
<AppBundleExtraOptions>$(AppBundleExtraOptions) --gcc_flags '...'</AppBundleExtraOptions>
```

So add support for the `LinkerArgument` item group, which will now serve this purpose.

A code search on GitHub for '<LinkerArgument' shows exactly 1 result, which
seems to be unrelated (it's for Java code), so hopefully no existing projects
will already have 'LinkerArguments' set.

Fixes #21331.
@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #9d4ed56] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 9d4ed563ef0969077866ca9d5634ee59c3751dc6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #9d4ed56] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 9d4ed563ef0969077866ca9d5634ee59c3751dc6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

.NET ( No breaking changes )

✅ API diff vs stable

.NET ( No breaking changes )

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 9d4ed563ef0969077866ca9d5634ee59c3751dc6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [CI Build #9d4ed56] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 9d4ed563ef0969077866ca9d5634ee59c3751dc6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #9d4ed56] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 9d4ed563ef0969077866ca9d5634ee59c3751dc6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #9d4ed56] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 9d4ed563ef0969077866ca9d5634ee59c3751dc6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #9d4ed56] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 9d4ed563ef0969077866ca9d5634ee59c3751dc6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #9d4ed56] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 9d4ed563ef0969077866ca9d5634ee59c3751dc6 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #9d4ed56] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 121 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 10 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 9d4ed563ef0969077866ca9d5634ee59c3751dc6 [PR build]

@rolfbjarne rolfbjarne merged commit f4e2c1f into main Aug 5, 2025
44 checks passed
@rolfbjarne rolfbjarne deleted the dev/rolf/linkerargument branch August 5, 2025 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Public MSBuild items for native linker arguments.

4 participants