Skip to content
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

[SR-15938] Error when referencing #dsohandle in a Swift test on Windows #58199

Closed
grynspan opened this issue Mar 4, 2022 · 1 comment
Closed
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler directives Feature: compiler directives (#if, #warning, #error, etc.) compiler The Swift compiler in itself platform support TBDGen Windows Platform: Windows

Comments

@grynspan
Copy link
Contributor

grynspan commented Mar 4, 2022

Previous ID SR-15938
Radar None
Original Reporter @grynspan
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s swift
Labels Bug
Assignee @grynspan
Priority Medium

md5: f7e5912816979bdef02552a32331f998

relates to:

  • SR-12821 Symbol is in generated IR file, but not in TBD file

Issue Description:

When writing a new Swift test (in the repo), if you reference #dsohandle, the build will fail at link time with this error:

<unknown>:0: error: symbol '__ImageBase' (__ImageBase) is in generated IR file, but not in TBD file

__ImageBase is the Windows equivalent of __dso_handle and is the symbol the compiler transforms #dsohandle into. It is supposed to be automagically generated by MSVC++ and points to the start of the COFF image being built (much like how __dso_handle points to the start of the Mach header on Apple platforms.)

Note: JIRA is fighting with me in re styling for the symbols I named above. ImageBase should have two leading underscores (and does in the compiler.) If it's showing up with just one, that's a JIRA thing.

@grynspan
Copy link
Contributor Author

Resolved on ToT.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added Windows Platform: Windows TBDGen compiler directives Feature: compiler directives (#if, #warning, #error, etc.) compiler The Swift compiler in itself platform support and removed swift labels Jan 16, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler directives Feature: compiler directives (#if, #warning, #error, etc.) compiler The Swift compiler in itself platform support TBDGen Windows Platform: Windows
Projects
None yet
Development

No branches or pull requests

2 participants