Drop TARGET_IPHONE_SIMULATOR macro check

Recent versions of Clang always define these TARGET_ macros (to 0 or 1
as appropriate) for Apple targets.
https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5249072
made the code correctly check the *value* of the macro rather than
whether it was defined or not.

However, the code was still broken when actually targeting the iOS
simulator (where the macro is now 1).

It seems the use of this macro was just incorrect, and the code only
worked since it was never defined at all.

The original use of the macro in this file was added in
2c8108e6c2
but it 's not quite clear to me why.

All other uses have subsequently been removed, e.g. in
6a1d01220a

this removes the last instance, and should fix the iOS simulator builds.

Bug: chromium:1519899
Change-Id: Iaf44d2c37086f1153096044df5d9b61797f66a4f
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5272224
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
This commit is contained in:
Hans Wennborg 2024-02-06 15:38:46 +01:00 committed by libyuv LUCI CQ
parent d359a9f922
commit 2f2c04c157

View File

@ -13,12 +13,8 @@
#ifdef HAVE_JPEG
#include <assert.h>
#if !defined(TARGET_IPHONE_SIMULATOR)
#define TARGET_IPHONE_SIMULATOR 0
#endif
#if !defined(__pnacl__) && !defined(__CLR_VER) && \
!defined(COVERAGE_ENABLED) && !TARGET_IPHONE_SIMULATOR
!defined(COVERAGE_ENABLED)
// Must be included before jpeglib.
#include <setjmp.h>
#define HAVE_SETJMP