Page MenuHomePhabricator

[nix] Fix glog Pod build on Nix with Xcode 15
ClosedPublic

Authored by ashoat on Oct 23 2023, 1:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 30, 5:49 AM
Unknown Object (File)
Mon, Dec 30, 5:49 AM
Unknown Object (File)
Mon, Dec 30, 5:49 AM
Unknown Object (File)
Mon, Dec 30, 5:45 AM
Unknown Object (File)
Sat, Dec 14, 7:45 PM
Unknown Object (File)
Dec 5 2024, 1:11 PM
Unknown Object (File)
Nov 16 2024, 9:09 PM
Unknown Object (File)
Nov 16 2024, 9:09 PM
Subscribers

Details

Summary

The clang that is bundled in Xcode 15 now generates a different "triple" (compilation target) when it sees MACOSX_DEPLOYMENT_TARGET set. Instead of looking at the isysroot, for some reason it overrides that based on MACOSX_DEPLOYMENT_TARGET.

Nix sets MACOSX_DEPLOYMENT_TARGET to 11 for some backwards compatibility reason.

As a result, we started seeing build failures for the glog Pod in Nix after upgrading to Xcode 15.

This diff solves the issue by overriding MACOSX_DEPLOYMENT_TARGET to the empty string.

Test Plan
  1. To reproduce the error, you first need to clear your pods cache: pod cache clean --all && rm -rf native/ios/Pods
  2. Then try running a yarn cleaninstall (or manually running yarn postinstall in the root)

Before this diff it failed with Xcode 15 + Nix, but now it succeeds.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable