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

Back-ported from dev 2dc13d9c - Do not set the sdk_version for ld version > 520

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/v-jizhang/back_port into master Jun 02, 2020
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 4

Created by: v-jizhang

Summary: With the 11.4.1 Xcode toolchain, when warnings are treated as fatal (which some apps do), ld errors out on both the platform_version and sdk_version being set. https://reviews.llvm.org/rG25ce33a6e4f3b13732c0f851e68390dc2acb9123 shows that the platform is derived, and set after version 520.

We can always expect the Xcode toolchain to contain ld, so if we get the version, for versions above 520, we can stop setting the sdk_version. I haven't been able to find when it became an error.

ld: warning: -sdk_version and -platform_version are not compatible, ignoring -sdk_version
ld: fatal warning(s) induced error (-fatal_warnings)

LD versions:

chatatap@chatatap-mac ~/fbsource> /Applications/Xcode_11.4.1_fb.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -v
@(#)PROGRAM:ld  PROJECT:ld64-556.6
BUILD 13:10:29 Apr  7 2020
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 11.0.3, (clang-1103.0.32.59) (static support for 26, runtime is 26)
TAPI support using: Apple TAPI version 11.0.0 (tapi-1100.0.11)

chatatap@chatatap-mac ~/fbsource> /Applications/Xcode_11.3.1_fb.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -v
@(#)PROGRAM:ld  PROJECT:ld64-530
BUILD 18:57:17 Dec 13 2019
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
LTO support using: LLVM version 11.0.0, (clang-1100.0.33.17) (static support for 23, runtime is 23)
TAPI support using: Apple TAPI version 11.0.0 (tapi-1100.0.11)

If we cannot get the ld version for whatever reason, we fall back to the default behavior of setting the sdk_version.

Reviewed By: milend

shipit-source-id: 6d3181c705c14c141ae902e7f414c870a9a26324

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/v-jizhang/back_port