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-1192] LLDB swig static binding failure on non-Apple builds #4414

Closed
trfiala mannequin opened this issue Apr 8, 2016 · 7 comments
Closed

[SR-1192] LLDB swig static binding failure on non-Apple builds #4414

trfiala mannequin opened this issue Apr 8, 2016 · 7 comments
Assignees
Labels
bug Something isn't working LLDB for Swift

Comments

@trfiala
Copy link
Mannequin

trfiala mannequin commented Apr 8, 2016

Previous ID SR-1192
Radar None
Original Reporter @trfiala
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s LLDB for Swift
Labels Bug
Assignee @trfiala
Priority Medium

md5: 46319a25069a6c9cf97f07dc18885c9b

Issue Description:

See build breakage here:
https://ci.swift.org/view/Packages/job/oss-swift-package-linux-ubuntu-14_04/945/console

Swift LLDB builds using builders that do not have swig, and thus use the static swig bindings baked into the build, will fail on non-Apple OSes.

This is due to early evaluation of some new Apple-specific #ifdef code that is happening at swig file generation time instead of at the "compile in the generated binding" code. The net effect is that all systems using the static swig bindings are getting the #ifdef APPLE code erroneously.

In the case of Ubuntu, this is causing the swig binding code to be using some Apple-specific constants and file handling.

This showed up now because this is the first time we've added #ifdef code to the swig Python type maps file.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Apr 8, 2016

I have temporarily made a manual edit to the static swig bindings until I can adjust the swig step to make sure the #ifdef in the typemap passes through to the generated file.

That temporary change is here:
apple/swift-lldb@fbbacbd

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Apr 8, 2016

It looks like I can use the following swig syntax to support ensuring the #ifdef carries through to the baked file:

From the Swig manual:
```
%{
#ifdef NEED_BLAH
int blah() {
...
}
#endif
%}
```

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Apr 8, 2016

Testing a change for this locally. I'll send up in a PR if this generates the code I expect.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Apr 8, 2016

Oops no that's not the right syntax.

It looks like I really want:
%#ifdef ...

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Apr 8, 2016

I've got the fix in upstream llvm.org svn trunk. I'm waiting on testing of SR-1193 to complete before I submit a PR for this in GitHub.

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Apr 8, 2016

Testing the PR for this now:
apple/swift-lldb#13

@trfiala
Copy link
Mannequin Author

trfiala mannequin commented Apr 8, 2016

Merged in here:
apple/swift-lldb@70cbf39

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LLDB for Swift
Projects
None yet
Development

No branches or pull requests

0 participants