Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ec535f99e01ed62746ba04899359f01b391a2cae
      
https://github.com/WebKit/WebKit/commit/ec535f99e01ed62746ba04899359f01b391a2cae
  Author: Elliott Williams <[email protected]>
  Date:   2024-11-22 (Fri, 22 Nov 2024)

  Changed paths:
    M Source/JavaScriptCore/DerivedSources.make
    M Source/WebCore/DerivedSources.make
    M Source/WebKit/DerivedSources.make

  Log Message:
  -----------
  DerivedSources.make pattern rules don't work when a file's name has more than 
one "."
https://bugs.webkit.org/show_bug.cgi?id=283380
rdar://140231317

Reviewed by Alexey Proskuryakov.

In our DerivedSources Makefiles, we represent scripts that generate
multiple outputs by transforming output lists to a list of patterns
using $(subst ...). For example:

    GENERATED_PROCESS_SYNC_CLIENT_OUTPUT_FILES = \
            ProcessSyncClient.cpp \
            ProcessSyncClient.h \
            ProcessSyncData.h \
            ProcessSyncData.serialization.in \

    GENERATED_PROCESS_SYNC_CLIENT_OUTPUT_PATTERNS = $(subst 
.,%,$(GENERATED_PROCESS_SYNC_CLIENT_OUTPUT_FILES))

However, if a file name has multiple "." characters, this generates an
invalid pattern string, e.g. "ProcessSyncData%serialization%in' in the
above example. As a result, Make doesn't know how to make the file it is
based on. The build fails if and only if Make considers this file before
the rule has finished running on behalf of one of the other output files.

We have deployed targeted fixes before, but the issue is subtle enough
that it's easy to copy-paste existing code and re-introduce the issue in
new rules. Replace all $(subst ...) recipes with an implementation that
separates the basename and extname, and only transforms the extname.

* Source/JavaScriptCore/DerivedSources.make:
* Source/WebCore/DerivedSources.make:
* Source/WebKit/DerivedSources.make:

Canonical link: https://commits.webkit.org/286966@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to