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-9594] swift -frontend -num-threads (>1) places symbols in the wrong .o files. #52041

Open
atrick opened this issue Jan 3, 2019 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself IRGen LLVM IR generation

Comments

@atrick
Copy link
Member

atrick commented Jan 3, 2019

Previous ID SR-9594
Radar rdar://47014491
Original Reporter @atrick
Type Bug

Attachment: Download

Environment

On Swift master.

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, IRGen
Assignee None
Priority Medium

md5: 058aa7e14ea1a9bdf13b61536bce5e23

Issue Description:

When parallel compilation is enabled. The compiler always generates symbols for `main` in the first .o file. Symbols for the rest of the source files are shuffled into the remaining .o files.

$ swiftc -incremental -whole-module-optimization -num-threads 3 a.swift main.swift b.swift

$ swift -frontend -c a.swift main.swift b.swift -num-threads 3 -o a.o -o main.o -o b.o

nm -nm a.o

(_TEXT,_text) external _main

nm -nm main.o

(_TEXT,_text) private external _$S1a4fooASiyF

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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 The Swift compiler in itself IRGen LLVM IR generation
Projects
None yet
Development

No branches or pull requests

1 participant