Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ANGLE] Add target for metal_translator_fuzzer #23337

Conversation

ddkilzer
Copy link
Contributor

@ddkilzer ddkilzer commented Jan 27, 2024

704290f

[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

b975b63

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac   πŸ›  wpe   πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2   πŸ§ͺ api-mac   πŸ§ͺ api-wpe
  πŸ§ͺ ios-wk2-wpt   πŸ§ͺ mac-wk1   πŸ›  gtk
  πŸ§ͺ api-ios   πŸ§ͺ mac-wk2   πŸ§ͺ gtk-wk2
  πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2   πŸ§ͺ api-gtk
  πŸ›  tv-sim
  πŸ›  watch
βœ… πŸ›  πŸ§ͺ unsafe-merge   πŸ›  watch-sim

@ddkilzer ddkilzer self-assigned this Jan 27, 2024
@ddkilzer ddkilzer added the ANGLE Bugs related to the ANGLE project label Jan 27, 2024
@@ -186,6 +191,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)

if (translator == nullptr)
{
sh::Finalize(); // WebKit change.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just remove the comments..
We manage the changes other way, so maybe just add the code as you would in a normal and I can upstream them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. Thanks! (I was trying to follow the libwebrtc rules here.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably don't need to upstream the ANGLE_TRANSLATOR_FUZZER_METAL_ONLY change, but wouldn't hurt.

@ddkilzer ddkilzer force-pushed the eng/ANGLE-Add-target-for-metal_translator_fuzzer branch from 43ecf67 to b975b63 Compare January 29, 2024 20:52
@ddkilzer ddkilzer added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 29, 2024
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
@webkit-commit-queue webkit-commit-queue force-pushed the eng/ANGLE-Add-target-for-metal_translator_fuzzer branch from b975b63 to 704290f Compare January 29, 2024 21:17
@webkit-commit-queue
Copy link
Collaborator

Committed 273682@main (704290f): https://commits.webkit.org/273682@main

Reviewed commits have been landed. Closing PR #23337 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 704290f into WebKit:main Jan 29, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 29, 2024
@ddkilzer ddkilzer deleted the eng/ANGLE-Add-target-for-metal_translator_fuzzer branch January 29, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ANGLE Bugs related to the ANGLE project
Projects
None yet
4 participants