Skip to content

Commit

Permalink
[WebRTC] Extract BaseTarget-libaom.xcconfig from libaom.xcconfig
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=267022
<rdar://120399649>

Reviewed by Elliott Williams.

* Source/ThirdParty/libwebrtc/Configurations/BaseTarget-libaom.xcconfig: Add.
- Extract settings from libaom.xcconfig.
(WARNING_CFLAGS):
- Add missing $(inherited) to define warning flags consistently.
- Add -Wno-unused-function to fix the build after adding $(inherited).
* Source/ThirdParty/libwebrtc/Configurations/libaom.xcconfig:
- Include BaseTarget-libaom.xcconfig after extracting settings.
* Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj:
- Add BaseTarget-libaom.xcconfig to the project.

Canonical link: https://commits.webkit.org/272641@main
  • Loading branch information
David Kilzer authored and ddkilzer committed Jan 4, 2024
1 parent e76ab16 commit f67a9fb
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright (C) 2018-2023 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_STRICT_PROTOTYPES = NO;
CLANG_WARN_IMPLICIT_FUNCTION_DECLARATION = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_WARN_UNUSED_FUNCTION = NO;

WARNING_CFLAGS = $(inherited) -Wno-implicit-function-declaration -Wno-strict-prototypes -Wno-unused-function;

// FIXME: Enable x86 optimization
HEADER_SEARCH_PATHS[arch=x86_64] = $(inherited) Source/third_party/libaom/source/config/linux/generic Source/third_party/libaom/source/libaom Source/third_party/libaom/source/config;
HEADER_SEARCH_PATHS[arch=arm64*] = $(inherited) Source/third_party/libaom/source/config/linux/arm64-cpu-detect Source/third_party/libaom/source/libaom Source/third_party/libaom/source/config;

USE_HEADERMAP = NO;

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) CONFIG_REALTIME_ONLY=1 WEBRTC_WEBKIT_BUILD CONFIG_TUNE_VMAF=0

GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*] = $(inherited);
GCC_PREPROCESSOR_DEFINITIONS[sdk=macosx*] = $(inherited) $(GCC_PREPROCESSOR_DEFINITIONS_$(WK_IS_CATALYST))
GCC_PREPROCESSOR_DEFINITIONS_YES = WEBRTC_WEBKIT_MAC_CATALIST
46 changes: 25 additions & 21 deletions Source/ThirdParty/libwebrtc/Configurations/libaom.xcconfig
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
// Copyright (C) 2018-2023 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "BaseTarget-libaom.xcconfig"

PRODUCT_NAME = aom;

CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_STRICT_PROTOTYPES = NO;
CLANG_WARN_IMPLICIT_FUNCTION_DECLARATION = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
COMBINE_HIDPI_IMAGES = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_WARN_UNUSED_FUNCTION = NO;

WARNING_CFLAGS = -Wno-implicit-function-declaration -Wno-strict-prototypes;

// FIXME: Enable x86 optimization
HEADER_SEARCH_PATHS[arch=x86_64] = Source/third_party/libaom/source/config/linux/generic Source/third_party/libaom/source/libaom Source/third_party/libaom/source/config;
HEADER_SEARCH_PATHS[arch=arm64*] = Source/third_party/libaom/source/config/linux/arm64-cpu-detect Source/third_party/libaom/source/libaom Source/third_party/libaom/source/config;

INSTALL_PATH = $(INSTALL_PATH_PREFIX)$(WK_LIBRARY_INSTALL_PATH);
PUBLIC_HEADERS_FOLDER_PATH = $(INSTALL_PATH_PREFIX)$(WK_LIBRARY_HEADERS_FOLDER_PATH)/libwebrtc;
USE_HEADERMAP = NO;

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) CONFIG_REALTIME_ONLY=1 WEBRTC_WEBKIT_BUILD CONFIG_TUNE_VMAF=0

GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*] = $(inherited);
GCC_PREPROCESSOR_DEFINITIONS[sdk=macosx*] = $(inherited) $(GCC_PREPROCESSOR_DEFINITIONS_$(WK_IS_CATALYST))
GCC_PREPROCESSOR_DEFINITIONS_YES = WEBRTC_WEBKIT_MAC_CATALIST

ARM_FILES = *_neon.c arm_cpudetect.c *_arm.c hash_arm_crc32.c *_neon_dotprod.c *_neon.c
X86_FILES = *_sse2.c *_ssse3.c *_sse4.c *_avx2.c *_avx2.cc *_avx.c *.asm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9429,6 +9429,7 @@
44E751A72AC73EA700828AC4 /* scoped_key_value_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scoped_key_value_config.h; sourceTree = "<group>"; };
44E751AB2AC73F8800828AC4 /* field_trial.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = field_trial.cc; sourceTree = "<group>"; };
44E751B32AC73F8800828AC4 /* field_trial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = field_trial.h; sourceTree = "<group>"; };
44F99B2E2B2E9DCA00BE6517 /* BaseTarget-libaom.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "BaseTarget-libaom.xcconfig"; sourceTree = "<group>"; };
44FD166E2AEA16CC003636CB /* vp8_replay_fuzzer.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = vp8_replay_fuzzer.xcconfig; sourceTree = "<group>"; };
44FD16732AEA1F36003636CB /* json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = json.h; sourceTree = "<group>"; };
44FD16752AEA3562003636CB /* null_transport.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = null_transport.cc; sourceTree = "<group>"; };
Expand Down Expand Up @@ -19826,6 +19827,7 @@
449187232AB3800D007266F2 /* Base-libvpx.xcconfig */,
44871D222AC69336007538BC /* Base-libwebrtc.xcconfig */,
5D7C59C61208C68B001C873E /* Base.xcconfig */,
44F99B2E2B2E9DCA00BE6517 /* BaseTarget-libaom.xcconfig */,
5C4B43B01E42877A002651C8 /* boringssl.xcconfig */,
5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */,
448A76AD2AF054F400C0A67C /* h264_depacketizer_fuzzer.xcconfig */,
Expand Down

0 comments on commit f67a9fb

Please sign in to comment.