Skip to content

Commit

Permalink
Add target for webm_fuzzer
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270712
<rdar://124294964>

Reviewed by Alex Christensen.

* Source/ThirdParty/libwebrtc/Configurations/h264_bitstream_parser_fuzzer.xcconfig:
(PRODUCT_NAME): Add.
* Source/ThirdParty/libwebrtc/Configurations/h265_bitstream_parser_fuzzer.xcconfig:
(PRODUCT_NAME): Add.
- Drive-by fix to add PRODUCT_NAME to each xcconfig file.

* Source/ThirdParty/libwebrtc/Configurations/BaseTarget-libwebm.xcconfig: Copied from Source/ThirdParty/libwebrtc/Configurations/libwebm.xcconfig.
* Source/ThirdParty/libwebrtc/Configurations/libwebm.xcconfig:
- Extract common variables from libwebm.xcconfig into
  BaseTarget-libwebm.xcconfig.
* Source/ThirdParty/libwebrtc/Configurations/webm_fuzzer.xcconfig: Add.
* Source/ThirdParty/libwebrtc/libwebrtc.xcodeproj/project.pbxproj:
- Drive-by fix to remove redundant PRODUCT_NAME variables from various
  targets.
(Fuzzers (libwebrtc)):
- Add webm_fuzzer as dependency to aggregate target.
(webm_fuzzer target): Add.
- Add target to build webm_fuzzer.

Canonical link: https://commits.webkit.org/275865@main
  • Loading branch information
David Kilzer authored and ddkilzer committed Mar 9, 2024
1 parent 04727dd commit 3aba390
Show file tree
Hide file tree
Showing 6 changed files with 209 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright (C) 2020-2024 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;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;

HEADER_SEARCH_PATHS = Source/third_party/libwebm Source/third_party/libwebm/webm_parser Source/third_party/libwebm/webm_parser/include;
USE_HEADERMAP = NO;
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@

#include "Base-libwebrtc.xcconfig"

PRODUCT_NAME = h264_bitstream_parser_fuzzer;

WARNING_CFLAGS = $(inherited) -Wno-shorten-64-to-32;
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@

#include "Base-libwebrtc.xcconfig"

PRODUCT_NAME = h265_bitstream_parser_fuzzer;

WARNING_CFLAGS = $(inherited) -Wno-shorten-64-to-32;
31 changes: 24 additions & 7 deletions Source/ThirdParty/libwebrtc/Configurations/libwebm.xcconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
PRODUCT_NAME = webm;
// Copyright (C) 2020-2024 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;
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
#include "BaseTarget-libwebm.xcconfig"

HEADER_SEARCH_PATHS = Source/third_party/libwebm Source/third_party/libwebm/webm_parser Source/third_party/libwebm/webm_parser/include;
PRODUCT_NAME = webm;

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

OTHER_LDFLAGS = $(inherited) $(SOURCE_VERSION_LDFLAGS);
28 changes: 28 additions & 0 deletions Source/ThirdParty/libwebrtc/Configurations/webm_fuzzer.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (C) 2024 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-libwebm.xcconfig"

PRODUCT_NAME = webm_fuzzer;

GCC_ENABLE_CPP_EXCEPTIONS = YES;
Loading

0 comments on commit 3aba390

Please sign in to comment.