Skip to content

[Cherry-pick] Patches related to dwarf linker #8094

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

Conversation

felipepiovezan
Copy link

This is another wave of cherry-picks from llvm.org with the ultimate goal of cherry-picking the debug_names work that has been done.

Before we can change AccelTable.cpp/.h, there are indirect dependencies with DWARFLinker (parallel and dsymutil) that must be cherry-picked (a lot of work was done upstream to refactor these entities). This PR handles some of those.

kazutakahirata and others added 6 commits January 31, 2024 15:30
The last use was removed by:

  commit be91b4e
  Author: Jonas Devlieghere <[email protected]>
  Date:   Fri Mar 31 09:45:06 2023 -0700

(cherry picked from commit 7ea9d95)
Use createTemporaryFile in favor of the TempFile abstraction to ensure
we have an on-disk file. This fixes an issue on Windows where the DWARF
verifier would fail when trying to open the temporary file from disk.

(cherry picked from commit a04879c)
This patch re-enabled auto as the default verification mode when
building with assertions or expensive checks. This was disabled in
c2d2f72 because of an issue with temp files on Windows, which was
fixed in 519490f26260.

(cherry picked from commit c296c35)
Dump verification errors to a local buffer instead of racing stdio and
potentially showing interleaved output.

(cherry picked from commit 4d1d8a8)
When processing multiple architectures in parallel, we need to protect
access to stdio with a mutex. We already have a mutex for that purpose,
but it was only used in the DWARFLinker. This patch protects writes to
stdio in driver.

(cherry picked from commit 74727a4)
@felipepiovezan
Copy link
Author

@swift-ci test

@felipepiovezan felipepiovezan marked this pull request as draft February 1, 2024 16:26
…ARFLinkerParallel.

This patch is extracted from D96035, it adds support for the existing
DWARFLinker functionality. What is not supported yet:

1. Types deduplication(--odr mode).
2. Modules deduplication.
3. Generation of index tables.

Reland2: temporarily disabled call to "--linker llvm" for tls-variable.test
and location-expression.test as it does not work properly on bigendian
architecture.

Differential Revision: https://reviews.llvm.org/D153268
@felipepiovezan felipepiovezan force-pushed the felipe/cherry-picks-debugnames1 branch from f719536 to d040b86 Compare February 1, 2024 16:32
@felipepiovezan felipepiovezan marked this pull request as ready for review February 1, 2024 16:33
@felipepiovezan
Copy link
Author

@swift-ci test

@felipepiovezan
Copy link
Author

@swift-ci test platform windows

@felipepiovezan
Copy link
Author

@swift-ci test Windows platform

@felipepiovezan felipepiovezan merged commit 934601b into swiftlang:stable/20230725 Feb 1, 2024
@felipepiovezan felipepiovezan deleted the felipe/cherry-picks-debugnames1 branch February 1, 2024 21: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.

5 participants