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
  • !1168

[swift] Add -iquote rootPath into clang args

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/zayhero-zz/zayhero__add_source_root_to_iquote into master Feb 08, 2017
  • Overview 12
  • Commits 1
  • Pipelines 0
  • Changes 7

Created by: zayhero-zz

When we use bridging header to generate swift modules, swift sometimes include the bridging header into -Swift.h. For example, sth like this

#import "bridging-header/bridging-header.h"

Theoretically, swift should only import bridging-header.h instead of the full path, but that's not what they are doing right now. And BUCK is not able to build the objC code if its importing the -Swift.h. clang throws this exception

In file included from CallHello.m:1:
In file included from CallHello.h:1:
buck-out/gen/Greeter#macosx-x86_64,static,swift-compile/Greeter-Swift.h:121:9: fatal error: 'bridging-header/bridging-header.h' file not found
#import "bridging-header/bridging-header.h"

To fix this problem, this PR is adding -iquote rootPath into clang flags, so clang can build the objC files.

For testing, update the tests to verify the change.

PS. I am not sure if making change on AppleCxxPlatforms is the best approach, please let me know if there is a better way. I am also thinking adding compiler_flags = ['-iquote', os.getcwd()] in the build rule, but this seems too hacky to me.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/zayhero-zz/zayhero__add_source_root_to_iquote