-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ANGLE] Add target for metal_translator_fuzzer
https://bugs.webkit.org/show_bug.cgi?id=268201 <rdar://98947215> Reviewed by Kimmo Kinnunen. * Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj: - Add BaseTarget.xcconfig and metal_translator_fuzzer.xcconfig. (metal_translator_fuzzer): Add target. - Add translator_fuzzer.cpp to the project. * Source/ThirdParty/ANGLE/Configurations/ANGLE-dynamic.xcconfig: - Add copyright header. (ANGLE_ALLOWABLE_CLIENTS): Add. - Disable -allowable_client switches when libFuzzer is enabled. (GCC_SYMBOLS_PRIVATE_EXTERN): Add. - Disable private extern symbols when libFuzzer is enabled. * Source/ThirdParty/ANGLE/Configurations/BaseTarget.xcconfig: Add. - Extract common settings from ANGLE-dynamic.xcconfig. (ANGLE_HEADER_PATH_PREFIX): Add. - Add variable for header include path prefix so it may be overridden. * Source/ThirdParty/ANGLE/Configurations/metal_translator_fuzzer.xcconfig: Add. * Source/ThirdParty/ANGLE/src/compiler/fuzz/translator_fuzzer.cpp: (LLVMFuzzerTestOneInput): - Add a way to disable non-Metal outputs at build time. - Add SH_MSL_METAL_OUTPUT as a valid output. - Call sh::Finalize() after each test case since sh::Initialize is called at the start of every test case. Canonical link: https://commits.webkit.org/273682@main
- Loading branch information
Showing
5 changed files
with
203 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
Source/ThirdParty/ANGLE/Configurations/BaseTarget.xcconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// 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 "../../../../Configurations/Version.xcconfig" | ||
|
||
ANGLE_HEADER_PATH_PREFIX = .; | ||
|
||
HEADER_SEARCH_PATHS = ${DERIVED_FILES_DIR} $(ANGLE_HEADER_PATH_PREFIX)/WebKit $(ANGLE_HEADER_PATH_PREFIX)/include $(ANGLE_HEADER_PATH_PREFIX)/src $(ANGLE_HEADER_PATH_PREFIX)/src/common/base $(ANGLE_HEADER_PATH_PREFIX)/src/common/third_party/xxhash $(ANGLE_HEADER_PATH_PREFIX)/third_party/zlib/google; | ||
|
||
USE_HEADERMAP = NO; | ||
|
||
GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) LIBGLESV2_IMPLEMENTATION LIBANGLE_IMPLEMENTATION ANGLE_CAPTURE_ENABLED=0 ANGLE_ENABLE_METAL ANGLE_METAL_XCODE_BUILDS_SHADERS ANGLE_ENABLE_METAL_OWNERSHIP_IDENTITY $(GCC_PREPROCESSOR_DEFINITIONS_$(WK_PLATFORM_NAME)); | ||
GCC_PREPROCESSOR_DEFINITIONS_macosx = ANGLE_ENABLE_GLSL ANGLE_ENABLE_ESSL ANGLE_ENABLE_OPENGL ANGLE_ENABLE_GL_DESKTOP_BACKEND ANGLE_ENABLE_APPLE_WORKAROUNDS ANGLE_ENABLE_CGL GL_SILENCE_DEPRECATION; | ||
GCC_PREPROCESSOR_DEFINITIONS_maccatalyst = $(GCC_PREPROCESSOR_DEFINITIONS_macosx); | ||
GCC_PREPROCESSOR_DEFINITIONS_maccatalyst[arch=arm*] = $(GCC_PREPROCESSOR_DEFINITIONS_macosx) ANGLE_ENABLE_EAGL GLES_SILENCE_DEPRECATION ANGLE_CPU_ARM64; |
26 changes: 26 additions & 0 deletions
26
Source/ThirdParty/ANGLE/Configurations/metal_translator_fuzzer.xcconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// 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.xcconfig" | ||
|
||
OTHER_CFLAGS = $(inherited) -DANGLE_TRANSLATOR_FUZZER_METAL_ONLY; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters