Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
iOS simulator builds are now configured with
``-mios-simulator-version-min`` instead of the device's
``-mios-version-min``. The device flag made the linker reject libraries
resolved from the simulator SDK, so library detection silently failed.
11 changes: 9 additions & 2 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,13 @@ AS_CASE([$host],
dnl Add the compiler flag for the iOS minimum supported OS version.
AS_CASE([$ac_sys_system],
[iOS], [
AS_VAR_APPEND([CFLAGS], [" -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"])
AS_VAR_APPEND([LDFLAGS], [" -mios-version-min=${IPHONEOS_DEPLOYMENT_TARGET}"])
dnl -mios-version-min names the device platform; against the simulator SDK it
dnl makes the linker reject every dylib it resolves there.
Comment on lines +1011 to +1012

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to encode the historical existence of a bug in a comment.

Suggested change
dnl -mios-version-min names the device platform; against the simulator SDK it
dnl makes the linker reject every dylib it resolves there.

AS_IF([test "x$_host_device" = "xsimulator"],
[_ios_version_min_flag=-mios-simulator-version-min],
[_ios_version_min_flag=-mios-version-min])
AS_VAR_APPEND([CFLAGS], [" ${_ios_version_min_flag}=${IPHONEOS_DEPLOYMENT_TARGET}"])
AS_VAR_APPEND([LDFLAGS], [" ${_ios_version_min_flag}=${IPHONEOS_DEPLOYMENT_TARGET}"])
Comment on lines +1013 to +1017

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be significantly simplified (and be less reliant on the mostly incidental side effect of _host_device being set hundreds of lines earlier) by using a single case statement that evaluates on a match for the host, has 2 cases, with each case setting CFLAGS and LDFLAGS.

],
)

Expand Down
Loading