lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
246 stars 17 forks source link

23973685: Regression: xcodebuild no longer infers destination platform from -sdk parameter #7025

Open openradar-mirror opened 8 years ago

openradar-mirror commented 8 years ago

Description

Summary: In Xcode 7.1.1 and earlier, passing -sdk iphonesimulator to xcodebuild would imply a suitable destination. In Xcode 7.2, this is no longer the case and the inferred destination is a generic iOS device rather than a simulator.

It is hard to imagine a case where this would be desired behaviour.

Steps to Reproduce:

  1. Create a new iOS project with Xcode 7.1.1 or earlier.
  2. With Xcode 7.1.1 or earlier selected through xcode-select or DEVELOPER_DIR, build it from the command line: xcodebuild -configuration Release -scheme -sdk iphonesimulator clean build
  3. Run the same build with Xcode 7.2

Expected Results: The build should succeed in both cases.

Actual Results: Xcodebuild infers a valid SDK root (iphonesimulator9.2) and sets -isysroot to -isysroot $DEVELOPER_DIR/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk. However, it selects architectures armv7 and arm64, and puts $DEVELOPER_DIR/Platforms/iPhoneOS.platform/Developer/usr/bin in $PATH.

This results in the compiler trying to use the simulator version of sys/cdefs.h to build with armv7 and arm64 architectures, which produces errors like:

In file included from :1: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture

error Unsupported architecture

^

Notes: The attached archive contains:

Configuration: Happens consistently in all tested configurations involving Xcode 7.2.

Product Version: 7.2/7C68 & 10.11.2/15C50 Created: 2015-12-21T16:03:12.825080 Originated: 2015-12-22T00:00:00 Open Radar Link: http://www.openradar.me/23973685

openradar-mirror commented 8 years ago

Modified: 2016-01-06T15:02:56.514930

openradar-mirror commented 8 years ago

Modified: 2016-01-06T15:02:56.514930

openradar-mirror commented 8 years ago

Modified: 2016-01-06T15:02:56.514930

openradar-mirror commented 8 years ago

Modified: 2016-01-06T15:02:56.514930