Skip to content

Commit

Permalink
Fix the build
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=255938
rdar://108513290

Unreviewed build fix.

* Source/WebKit/mac/replace-webkit-additions-includes.py:
(check_should_do_replacement):

Canonical link: https://commits.webkit.org/263386@main
  • Loading branch information
hortont424 committed Apr 25, 2023
1 parent c356d9f commit ec6cecd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/WebKit/mac/replace-webkit-additions-includes.py
Expand Up @@ -29,6 +29,10 @@
import sys


# Enable this if `FeatureNeededForHeaderReplacement` should be taken into account.
should_restrict_header_replacement_based_on_feature = False


def read_content_from_webkit_additions(built_products_directory, sdk_root_directory, filename):
additions_path = os.path.join("usr/local/include/WebKitAdditions", filename)
try:
Expand All @@ -43,6 +47,8 @@ def read_content_from_webkit_additions(built_products_directory, sdk_root_direct


def check_should_do_replacement(built_products_directory, sdk_root_directory):
if not should_restrict_header_replacement_based_on_feature:
return True
feature_name = read_content_from_webkit_additions(built_products_directory, sdk_root_directory, 'FeatureNeededForHeaderReplacement').strip()
return os.environ.get(feature_name) == '1'

Expand Down

0 comments on commit ec6cecd

Please sign in to comment.