Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !1229

Use filelist for swift output dynamic library and object files

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/nguyentruongtho/use_filelist_for_obj into master Mar 09, 2017
  • Overview 3
  • Commits 3
  • Pipelines 0
  • Changes 4

Created by: nguyentruongtho

Pull out from https://github.com/facebook/buck/pull/917

Before this PR:

  • Swift object files stay in the link command of any parent target.
  • Swift dylib files are in the link command of any parent target, along with object files from the same swift target. This is wrong because object files should only be used for static linking.

After:

  • Swift object files will stay in an filelist, along with other object files from cxx rules. If the target is a shared target, only its dylib output file will be used for linking (not its object files)
  • Swift dylib files stay in an output filelist of the link command.

This also helps to remove duplication of swift object files in a link command.

Sample: Input: A depends on B (swift)

A link command:

...
-Xlinker -add_ast_path
/path/to/B.swiftmodule
/path/to/B.o
...

will change to

-Xlinker -add_ast_path
/path/to/B.swiftmodule
...
-filelist
/path/to/B_filelist.txt <--- /path/to/B.o is in here
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/nguyentruongtho/use_filelist_for_obj