libwebrtc fails to build on arm64
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jun 2020 23:42:01 +0000 (23:42 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jun 2020 23:42:01 +0000 (23:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=213476

Reviewed by Maciej Stachowiak.

* Configurations/libvpx.xcconfig:
* Configurations/libwebrtc.xcconfig:
* Configurations/opus.xcconfig:
Use architecture conditionals instead of SDK conditionals for code that is
architecture-dependent.

Remove an macOS-version-dependent definition of EXCLUDED_SOURCE_FILE_NAMES
which is no longer used after r232665.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@263375 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/ThirdParty/libwebrtc/ChangeLog
Source/ThirdParty/libwebrtc/Configurations/libvpx.xcconfig
Source/ThirdParty/libwebrtc/Configurations/libwebrtc.xcconfig
Source/ThirdParty/libwebrtc/Configurations/opus.xcconfig

index 591bf2b..da97822 100644 (file)
@@ -1,5 +1,21 @@
 2020-06-22  Tim Horton  <timothy_horton@apple.com>
 
+        libwebrtc fails to build on arm64
+        https://bugs.webkit.org/show_bug.cgi?id=213476
+
+        Reviewed by Maciej Stachowiak.
+
+        * Configurations/libvpx.xcconfig:
+        * Configurations/libwebrtc.xcconfig:
+        * Configurations/opus.xcconfig:
+        Use architecture conditionals instead of SDK conditionals for code that is
+        architecture-dependent.
+
+        Remove an macOS-version-dependent definition of EXCLUDED_SOURCE_FILE_NAMES
+        which is no longer used after r232665.
+
+2020-06-22  Tim Horton  <timothy_horton@apple.com>
+
         Update macOS version macros
         https://bugs.webkit.org/show_bug.cgi?id=213484
 
index 0d71afe..61f2509 100644 (file)
@@ -7,9 +7,8 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
 COMBINE_HIDPI_IMAGES = NO;
 ENABLE_STRICT_OBJC_MSGSEND = YES;
 
-HEADER_SEARCH_PATHS[sdk=macos*] = Source/third_party/libvpx/source/config/mac/x64 Source/third_party/libvpx/source/libvpx Source/third_party/libvpx/source/config;
-HEADER_SEARCH_PATHS[sdk=iphonesimulator*] = Source/third_party/libvpx/source/config/mac/x64 Source/third_party/libvpx/source/libvpx Source/third_party/libvpx/source/config;
-HEADER_SEARCH_PATHS[sdk=iphoneos*] = Source/third_party/libvpx/source/config/ios/arm64 Source/third_party/libvpx/source/libvpx Source/third_party/libvpx/source/config;
+HEADER_SEARCH_PATHS[arch=x86_64] = Source/third_party/libvpx/source/config/mac/x64 Source/third_party/libvpx/source/libvpx Source/third_party/libvpx/source/config;
+HEADER_SEARCH_PATHS[arch=arm64*] = Source/third_party/libvpx/source/config/ios/arm64 Source/third_party/libvpx/source/libvpx Source/third_party/libvpx/source/config;
 
 INSTALL_PATH = /usr/local/lib;
 PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include/libwebrtc;
@@ -20,6 +19,7 @@ GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*] = $(inherited) WK_DISABLE_HAR
 ARM_FILES = *_neon.c arm_cpudetect.c *_arm.c
 X86_FILES = *_sse2.c *_ssse3.c *_sse4.c *_avx2.c *_avx.c *.asm
 
-EXCLUDED_SOURCE_FILE_NAMES[sdk=macos*] = $(ARM_FILES) sad.c
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = $(ARM_FILES) $(X86_FILES)
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*] = $(X86_FILES)
+EXCLUDED_SOURCE_FILE_NAMES[sdk=macos*][arch=x86_64] = $(ARM_FILES) sad.c
+EXCLUDED_SOURCE_FILE_NAMES[sdk=macos*][arch=arm64*] = $(X86_FILES)
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*][arch=arm64*] = $(X86_FILES)
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = $(X86_FILES) $(ARM_FILES)
index 377e9f2..76034d9 100644 (file)
@@ -32,9 +32,14 @@ GCC_PREPROCESSOR_DEFINITIONS[sdk=macosx*] = $(inherited) WEBRTC_USE_VTB_HARDWARE
 GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*] = $(inherited) WEBRTC_IOS;
 GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*] = $(inherited) WEBRTC_IOS;
 
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*] = *_sse.cc *_sse2.cc macutils.cc macwindowpicker.cc audio_device_mac.cc audio_mixer_manager_mac.cc logging_mac.mm;
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = macutils.cc macwindowpicker.cc audio_device_mac.cc audio_mixer_manager_mac.cc logging_mac.mm;
-EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = voice_processing_audio_unit.mm;
+EXCLUDED_SOURCE_FILE_NAMES_macosx = voice_processing_audio_unit.mm;
+EXCLUDED_SOURCE_FILE_NAMES_ios = macutils.cc macwindowpicker.cc audio_device_mac.cc audio_mixer_manager_mac.cc logging_mac.mm;
+EXCLUDED_SOURCE_FILE_NAMES_arm = *_sse.cc *_sse2.cc;
+
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*] = $(EXCLUDED_SOURCE_FILE_NAMES_ios) $(EXCLUDED_SOURCE_FILE_NAMES_arm);
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = $(EXCLUDED_SOURCE_FILE_NAMES_ios);
+EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = $(EXCLUDED_SOURCE_FILE_NAMES_macosx);
+EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*][arch=arm64*] = $(EXCLUDED_SOURCE_FILE_NAMES_macosx) $(EXCLUDED_SOURCE_FILE_NAMES_arm);
 
 OTHER_LDFLAGS[sdk=macosx10.13*] = $(inherited);
 OTHER_LDFLAGS[sdk=macosx10.14*] = $(inherited);
index 443d55c..9902917 100644 (file)
@@ -18,8 +18,7 @@ GCC_PREPROCESSOR_DEFINITIONS[arch=arm64*] = $(inherited) OPUS_ARM_PRESUME_AARCH6
 GCC_PREPROCESSOR_DEFINITIONS[arch=x86_64] = $(inherited) OPUS_X86_MAY_HAVE_SSE2 OPUS_X86_PRESUME_SSE2 $(SSE4_FLAG);
 
 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator*] = *_sse.c *_sse4_1.c x86_silk_map.c;
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*] = *_sse.c *_sse2.c *_sse4_1.c x86_silk_map.c;
-EXCLUDED_SOURCE_FILE_NAMES[sdk=macosx*] = $(EXCLUDED_SOURCE_FILE_NAMES_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+EXCLUDED_SOURCE_FILE_NAMES[arch=arm64*] = *_sse.c *_sse2.c *_sse4_1.c x86_silk_map.c;
 
 // The iOS Simulator can't use SSE4 intrinsics, but macOS can.
 SSE4_FLAG[sdk=macosx*] = OPUS_X86_MAY_HAVE_SSE4_1;