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
  • Issues
  • #2399
Closed
Open
Issue created Feb 21, 2020 by Administrator@rootContributor

Bridging headers only import relative paths when creating DSYM

Created by: davidxiasc

When building mixed ObjC/Swift apple binaries that have a bridging header, the bridging header will only check headers by the relative path when generating the DSYM.

This can be illustrated by this example project: https://github.com/davidxiasc/buck-dsym-bridging

If you run buck build :Test#dwarf-with-dsym,iphoneos-arm64

you will get the following error, complaining that Foo.h cannot be found, even though it is under Source/Foo.h. Note that the compiler is able to detect SameDirectory.h as it is located in the same directory as the bridging header.

<path>/Bridging-Header.h:2:9: error: 'Foo.h' file not found
#import "Foo.h"
        ^
<unknown>:0: error: failed to import bridging header 'Bridging-Header.h'

Command failed with exit code 1.

command: [/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc, -frontend, -sdk, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk, -target, arm64-apple-ios10.0, -import-objc-header, Bridging-Header.h, -Xcc, -Ibuck-out/gen/Test#headers,iph...
<truncated>
...

stderr: <path>/Bridging-Header.h:2:9: error: 'Foo.h' file not found
#import "Foo.h"
        ^
<unknown>:0: error: failed to import bridging header 'Bridging-Header.h'


    When running <swift compile>.
    When building rule //:Test#dwarf-with-dsym,iphoneos-arm64,swift-compile.

However, if instead you run buck :Test#dwarf,iphoneos-arm64, the binary builds correctly.

Oddly, running buck build :Test#dwarf-with-dsym,iphoneos-arm64 after buck :Test#dwarf,iphoneos-arm64 (dirty state) passes, but doesn't actually generate any DSYM.

Assignee
Assign to
Time tracking