-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add emit_bc feature #2
base: uber/ios/0.15.0.002
Are you sure you want to change the base?
Conversation
# If we're emitting a single object, we don't use an object map; we just | ||
# declare the output file that the compiler will generate and there are | ||
# no other partial outputs. | ||
# If emit_bc is on, only one bitcode file is emitted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried output-file-map
, it doesn't seem to work with emic_bc
, -###
revealed it just ignore the output option and default to module-name.bc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even with num-threads
set? curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I'm missing something here
- with
num-threads
on, swift will actually try to output multiple bc files, except that I can't find an option to control the output location, whatever client option I provide it just ignores it and output to the root - with single threaded wmo, it will behave like buck did, this seems intentional, I'm just gonna disable threading during bc_merge pipeline I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you say root what do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bazel exec root
so swiftc -emit-bc -wmo -num-threads 6 -output-file-map output.json a.swift b.swift-###
will get you swiftc- frontend -emit-bc ... a.bc b.bc
Doesn't matter what you put in output.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Pretty fine with the single object file output if that makes things easier.
Adding emit_bc feature for bc_merge pipeline
Despite different output,
emit-object
andemit-bc
is largely the same in terms of input flag, etc, it's still in "compiling stage", feels like a feature flag is more fitting here rather than a new action