Skip to content

Conversation

pjcollins
Copy link
Member

@pjcollins pjcollins commented Feb 12, 2024

Context: https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/25351/APIScan-step-by-step-guide-to-setting-up-a-Pipeline

The ApiScan task has been added to pipeline runs against main. This
task should help us identify related issues earlier, rather than having
to wait for a full scan of VS.

Context: https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/25351/APIScan-step-by-step-guide-to-setting-up-a-Pipeline

The ApiScan task has been added to pipeline runs against `main`.  This
task should help us identify related issues earlier, rather than having
to wait for a full scan of VS.
@pjcollins
Copy link
Member Author

@grendello The missing symbols issue is resolved for llvm-strip.exe, however the latest results are showing missing symbols for ld.exe - https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9182240&view=logs&j=64f90b83-5b5a-57f8-612c-70e9ad4dc49b&t=5cc8bc58-5609-5f18-d0d0-cc36b9df15cc&l=57

@jonpryor
Copy link
Contributor

jonpryor commented Mar 7, 2024

What's "funny" is that when I build on Windows via build-llvm.cmd I don't have any ld.exe file. I instead have:

  • xa-build\windows\llvm\Release\bin\ld.lld.exe
  • xa-build\windows\llvm\Release\bin\ld64.lld.exe
  • xa-build\windows\llvm\Release\bin\lld{.exe,.pdb}
  • xa-build\windows\llvm\Release\bin\lld-link.exe
  • xa-build\windows\llvm\Release\bin\wasm-ld.exe

Of note is that the only file matching the glob bin\*ld*.pdb is bin\lld.pdb. (There is also e.g. lib\lldWasm.pdb file, which is next to a libWasm.lib file, which I can only assume is a static link library.)

Which brings me to @pjcollins ' comment:

the latest results are showing missing symbols for ld.exe

which raises a question: where is ld.exe coming from?

@jonpryor
Copy link
Contributor

jonpryor commented Mar 7, 2024

Relatedly odd is that there is no ld.exe within the windows\bin artifacts folder. There is lld.exe and lld.pdb.

@jonpryor
Copy link
Contributor

jonpryor commented Mar 7, 2024

@jonpryor asked:

which raises a question: where is ld.exe coming from?

It appears to be coming from package.sh, which special-cases/renames lld to ld:

https://github.com/xamarin/xamarin-android-binutils/blob/9d342d5057d39c0a9c48ce11cdea6694e36b71bc/package.sh#L87-L111

Given that, it might be easiest to mimic b590017 and explicitly copy lld.pdb into the artifacts folder.

This will hopefully allow symbols for `ld.exe` to be found:

    ##[error]3. ApiScan Error missingsymbols - File: binutils/windows/bin/ld.exe.
@grendello
Copy link
Contributor

#17 makes changes to ld+ldd+llvm-strip, it might be good to merge it before this PR and rebase here?

@jonpryor
Copy link
Contributor

SEL https://portal.microsofticm.com/imp/v3/incidents/incident/480553298/summary has been approved.

Re-running the build; hopefully the API Compliance Scan will succeed now: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=9230281&view=results

@pjcollins pjcollins marked this pull request as ready for review March 12, 2024 19:12
@jonpryor
Copy link
Contributor

jonpryor commented Mar 12, 2024

Context: https://devdiv.visualstudio.com/DevDiv/_wiki/wikis/DevDiv.wiki/25351/APIScan-step-by-step-guide-to-setting-up-a-Pipeline
Context: https://portal.microsofticm.com/imp/v3/incidents/incident/480553298/summary

The `APIScan@2` task has been added to pipeline runs against `main`.
This task should help us identify related issues earlier, rather than
having to wait for a full scan of VS.

Note: we rename many of the `.exe`s, e.g. rename `lld.exe` to `ld.exe`.
This prevents APIScan from finding symbol files, as APIScan appears to
check for a `.pdb` file matching the *original* filename, e.g. it needs
`lld.pdb` (original name), *not* `ld.pdb` (to match renamed `ld.exe`).

Update `package.sh` so that the original `*.pdb` filenames are copied
into `${artifacts_source_bin}`, so that APIScan can find symbols.

@jonpryor jonpryor merged commit 5ce8e53 into main Mar 12, 2024
@grendello grendello deleted the dev/pjc/apiscan branch March 12, 2024 19:45
grendello added a commit to dotnet/android that referenced this pull request Mar 13, 2024
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.0...L_17.0.6-7.1.1

This release is identical to the previous one, version wise, with the
difference being a handful of new build and link flags, as required by
API Scan.

* [ci] Build and sign in a DevDiv pipeline by @pjcollins in dotnet/android-native-tools#7
* [ci] Migrate to the 1ES template by @pjcollins in dotnet/android-native-tools#8
* [ci] Improve binskim scan performance by @pjcollins in dotnet/android-native-tools#11
* [ci] Improve triggers and support test signing by @pjcollins in dotnet/android-native-tools#12
* [ci] Fix unsigned artifact uploading by @pjcollins in dotnet/android-native-tools#13
* [ci] Disable automatic GitHub action trigger by @pjcollins in dotnet/android-native-tools#16
* [ci] Build on performance build pools by @pjcollins in dotnet/android-native-tools#15
* Build `as.exe` on windows by @grendello in dotnet/android-native-tools#10
* [ci] Add API Scan job by @pjcollins in dotnet/android-native-tools#9
grendello added a commit to dotnet/android that referenced this pull request Apr 2, 2024
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.1
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.2
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.2.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.0...L_17.0.6-7.1.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.1...L_17.0.6-7.1.2
Changes: dotnet/android-native-tools@L_17.0.6-7.1.2...L_17.0.6-7.2.0
Changes: dotnet/android-native-tools@L_17.0.6-7.2.0...L_17.0.6-7.2.1

This release makes changes to how we build and run the `as.exe` wrapper, so that it can be
verified by API Scan without any issues.  Otherwise it is identical to the previous release, using
the same version of LLVM.

* [ci] Build and sign in a DevDiv pipeline by @pjcollins in dotnet/android-native-tools#7
* [ci] Migrate to the 1ES template by @pjcollins in dotnet/android-native-tools#8
* [ci] Improve binskim scan performance by @pjcollins in dotnet/android-native-tools#11
* [ci] Improve triggers and support test signing by @pjcollins in dotnet/android-native-tools#12
* [ci] Fix unsigned artifact uploading by @pjcollins in dotnet/android-native-tools#13
* [ci] Disable automatic GitHub action trigger by @pjcollins in dotnet/android-native-tools#16
* [ci] Build on performance build pools by @pjcollins in dotnet/android-native-tools#15
* Build `as.exe` on windows by @grendello in dotnet/android-native-tools#10
* [ci] Add API Scan job by @pjcollins in dotnet/android-native-tools#9
*  Fix `as.exe` crash on Windows by @grendello in dotnet/android-native-tools#20
* [ci] Use managed identity for API Scan by @pjcollins in dotnet/android-native-tools#21
* Back to wide strings on Windows + magic encantations by @grendello in dotnet/android-native-tools#22
grendello added a commit to dotnet/android that referenced this pull request Apr 11, 2024
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.1
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.2
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.2.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.0...L_17.0.6-7.1.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.1...L_17.0.6-7.1.2
Changes: dotnet/android-native-tools@L_17.0.6-7.1.2...L_17.0.6-7.2.0
Changes: dotnet/android-native-tools@L_17.0.6-7.2.0...L_17.0.6-7.2.1

This release makes changes to how we build and run the `as.exe` wrapper, so that it can be
verified by API Scan without any issues.  Otherwise it is identical to the previous release, using
the same version of LLVM.

* [ci] Build and sign in a DevDiv pipeline by @pjcollins in dotnet/android-native-tools#7
* [ci] Migrate to the 1ES template by @pjcollins in dotnet/android-native-tools#8
* [ci] Improve binskim scan performance by @pjcollins in dotnet/android-native-tools#11
* [ci] Improve triggers and support test signing by @pjcollins in dotnet/android-native-tools#12
* [ci] Fix unsigned artifact uploading by @pjcollins in dotnet/android-native-tools#13
* [ci] Disable automatic GitHub action trigger by @pjcollins in dotnet/android-native-tools#16
* [ci] Build on performance build pools by @pjcollins in dotnet/android-native-tools#15
* Build `as.exe` on windows by @grendello in dotnet/android-native-tools#10
* [ci] Add API Scan job by @pjcollins in dotnet/android-native-tools#9
*  Fix `as.exe` crash on Windows by @grendello in dotnet/android-native-tools#20
* [ci] Use managed identity for API Scan by @pjcollins in dotnet/android-native-tools#21
* Back to wide strings on Windows + magic encantations by @grendello in dotnet/android-native-tools#22
jonathanpeppers pushed a commit to dotnet/android that referenced this pull request May 8, 2024
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.1
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.1.2
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.2.1
Context: https://github.com/xamarin/xamarin-android-binutils/releases/tag/L_17.0.6-7.2.2
Changes: dotnet/android-native-tools@L_17.0.6-7.1.0...L_17.0.6-7.1.1
Changes: dotnet/android-native-tools@L_17.0.6-7.1.1...L_17.0.6-7.1.2
Changes: dotnet/android-native-tools@L_17.0.6-7.1.2...L_17.0.6-7.2.0
Changes: dotnet/android-native-tools@L_17.0.6-7.2.0...L_17.0.6-7.2.1
Changes: dotnet/android-native-tools@L_17.0.6-7.2.1...L_17.0.6-7.2.2

This release makes changes to how we build and run the `as.exe` wrapper, so that it can be verified by API Scan without any issues.  Otherwise it is identical to the previous release, using the same version of LLVM.

* [ci] Build and sign in a DevDiv pipeline by @pjcollins in dotnet/android-native-tools#7
* [ci] Migrate to the 1ES template by @pjcollins in dotnet/android-native-tools#8
* [ci] Improve binskim scan performance by @pjcollins in dotnet/android-native-tools#11
* [ci] Improve triggers and support test signing by @pjcollins in dotnet/android-native-tools#12
* [ci] Fix unsigned artifact uploading by @pjcollins in dotnet/android-native-tools#13
* [ci] Disable automatic GitHub action trigger by @pjcollins in dotnet/android-native-tools#16
* [ci] Build on performance build pools by @pjcollins in dotnet/android-native-tools#15
* Build `as.exe` on windows by @grendello in dotnet/android-native-tools#10
* [ci] Add API Scan job by @pjcollins in dotnet/android-native-tools#9
*  Fix `as.exe` crash on Windows by @grendello in dotnet/android-native-tools#20
* [ci] Use managed identity for API Scan by @pjcollins in dotnet/android-native-tools#21
* Back to wide strings on Windows + magic encantations by @grendello in dotnet/android-native-tools#22
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.

3 participants