⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 290149 in webkit


Ignore:
Timestamp:
Feb 18, 2022, 12:06:08 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Generate compile_commands.json on macOS Builds
​https://bugs.webkit.org/show_bug.cgi?id=235686

Patch by Brandon Stewart <Brandon> on 2022-02-18
Reviewed by Saam Barati.

Add support for generating compile_commands.json file to WebKit.

compile_commands.json can be used by tools like clangd to provide code complete,
refactoring, formatting, and cross references.

Steps to generate the compile commands file:
make r EXPORT_COMPILE_COMMANDS=YES
generate-compile-commands WebKitBuild/Release

.:

  • Makefile.shared:

PerformanceTests:

  • DecoderTest/Configurations/DebugRelease.xcconfig:
  • MediaTime/Configurations/DebugRelease.xcconfig:

Source/bmalloc:

  • Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

  • Configurations/DebugRelease.xcconfig:

Source/ThirdParty/ANGLE:

  • Configurations/DebugRelease.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/DebugRelease.xcconfig:

Source/WebCore:

  • Configurations/DebugRelease.xcconfig:

Source/WebCore/PAL:

  • Configurations/DebugRelease.xcconfig:

Source/WebGPU:

  • Configurations/DebugRelease.xcconfig:

Source/WebInspectorUI:

  • Configurations/DebugRelease.xcconfig:

Source/WebKit:

  • Configurations/DebugRelease.xcconfig:
  • UIProcess/API/C/WKPageUIClient.h:

Source/WebKitLegacy/mac:

  • Configurations/DebugRelease.xcconfig:

Source/WTF:

  • Configurations/DebugRelease.xcconfig:

Tools:

  • ContentExtensionTester/Configurations/DebugRelease.xcconfig:
  • DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
  • ImageDiff/cg/Configurations/DebugRelease.xcconfig:
  • MiniBrowser/Configurations/DebugRelease.xcconfig:
  • Scripts/build-jsc:
  • Scripts/build-webkit:
  • Scripts/generate-compile-commands: Added.
  • TestWebKitAPI/Configurations/DebugRelease.xcconfig:
  • WebEditingTester/Configurations/DebugRelease.xcconfig:
  • WebKitTestRunner/Configurations/DebugRelease.xcconfig:
  • lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig:
Location:
trunk
Files:
1 added
39 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r290138 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Makefile.shared:
     18
    1192022-02-18  Adrian Perez de Castro  <aperez@igalia.com>
    220
  • trunk/Makefile.shared

    r289587 r290149  
    4646                XCODE_OPTIONS += WK_USE_CCACHE=YES
    4747        endif
     48endif
     49
     50ifneq (,$(EXPORT_COMPILE_COMMANDS))
     51                XCODE_OPTIONS += EXPORT_COMPILE_COMMANDS=YES
     52                XCODE_OPTIONS += GCC_PRECOMPILE_PREFIX_HEADER=NO
     53                XCODE_OPTIONS += CLANG_ENABLE_MODULE_DEBUGGING=NO
     54                XCODE_OPTIONS += COMPILER_INDEX_STORE_ENABLE=NO
    4855endif
    4956
  • trunk/PerformanceTests/ChangeLog

    r288325 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * DecoderTest/Configurations/DebugRelease.xcconfig:
     18        * MediaTime/Configurations/DebugRelease.xcconfig:
     19
    1202022-01-20  Ross Kirsling  <ross.kirsling@sony.com>
    221
  • trunk/PerformanceTests/DecoderTest/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3636SDKROOT_YES = macosx.internal;
    3737
     38OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     39COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     40
    3841WK_DEFAULT_LTO_MODE = $(WK_USER_LTO_MODE_none);
    3942
  • trunk/PerformanceTests/MediaTime/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3333SDKROOT_ = macosx;
    3434SDKROOT_YES = macosx.internal;
     35
     36OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     37COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
  • trunk/Source/JavaScriptCore/ChangeLog

    r290129 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-18  Mark Lam  <mark.lam@apple.com>
    220
  • trunk/Source/JavaScriptCore/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    4141SDKROOT_YES = macosx.internal;
    4242
     43OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     44COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     45
    4346WK_RELOCATABLE_FRAMEWORKS = YES;
    4447
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r290145 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-18  Saam Barati  <sbarati@apple.com>
    220
  • trunk/Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    1313SDKROOT_YES = macosx.internal;
    1414
     15OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     16COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     17
    1518WK_RELOCATABLE_FRAMEWORKS = YES;
    1619
  • trunk/Source/ThirdParty/libwebrtc/ChangeLog

    r290117 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-18  Saam Barati  <sbarati@apple.com>
    220
  • trunk/Source/ThirdParty/libwebrtc/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3737SDKROOT_YES = macosx.internal;
    3838
     39OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     40COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     41
    3942WK_RELOCATABLE_FRAMEWORKS = YES;
    4043
  • trunk/Source/WTF/ChangeLog

    r290146 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-18  Brady Eidson  <beidson@apple.com>
    220
  • trunk/Source/WTF/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3535SDKROOT_YES = macosx.internal;
    3636
     37OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     38COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     39
    3740WK_DEFAULT_LTO_MODE = $(WK_USER_LTO_MODE_none);
    3841
  • trunk/Source/WebCore/ChangeLog

    r290138 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-18  Adrian Perez de Castro  <aperez@igalia.com>
    220
  • trunk/Source/WebCore/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3636SDKROOT_YES = macosx.internal;
    3737
     38OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     39COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     40
    3841WK_RELOCATABLE_FRAMEWORKS = YES;
    3942
  • trunk/Source/WebCore/PAL/ChangeLog

    r290146 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-18  Brady Eidson  <beidson@apple.com>
    220
  • trunk/Source/WebCore/PAL/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3636SDKROOT_YES = macosx.internal;
    3737
     38OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     39COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     40
    3841WK_RELOCATABLE_FRAMEWORKS = YES;
    3942
  • trunk/Source/WebGPU/ChangeLog

    r290117 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-18  Saam Barati  <sbarati@apple.com>
    220
  • trunk/Source/WebGPU/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3636SDKROOT_YES = macosx.internal;
    3737
     38OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     39COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     40
    3841WK_RELOCATABLE_FRAMEWORKS = YES;
    3942
  • trunk/Source/WebInspectorUI/ChangeLog

    r290117 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-18  Saam Barati  <sbarati@apple.com>
    220
  • trunk/Source/WebInspectorUI/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    1313SDKROOT_YES = macosx.internal;
    1414
     15OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     16COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     17
    1518COMBINE_INSPECTOR_RESOURCES = NO;
    1619COMBINE_TEST_RESOURCES = YES;
  • trunk/Source/WebKit/ChangeLog

    r290146 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18        * UIProcess/API/C/WKPageUIClient.h:
     19
    1202022-02-18  Brady Eidson  <beidson@apple.com>
    221
  • trunk/Source/WebKit/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3636SDKROOT_YES = macosx.internal;
    3737
     38OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     39COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     40
    3841CODE_SIGN_IDENTITY[sdk=macosx*] = $(CODE_SIGN_IDENTITY_$(WK_USE_RESTRICTED_ENTITLEMENTS))
    3942CODE_SIGN_IDENTITY_ = $(CODE_SIGN_IDENTITY_NO);
  • trunk/Source/WebKit/UIProcess/API/C/WKPageUIClient.h

    r289612 r290149  
    136136typedef bool (*WKPageShouldAllowDeviceOrientationAndMotionAccessCallback)(WKPageRef page, WKSecurityOriginRef securityOrigin, WKFrameInfoRef frame, const void *clientInfo);
    137137
    138 typedef void (*WKPageRunWebAuthenticationPanelCallback)();
    139 typedef void (*WKPageRequestWebAuthenticationNoGestureCallback)();
     138typedef void (*WKPageRunWebAuthenticationPanelCallback)(void);
     139typedef void (*WKPageRequestWebAuthenticationNoGestureCallback)(void);
    140140typedef void (*WKPageDecidePolicyForSpeechRecognitionPermissionRequestCallback)(WKPageRef page, WKSecurityOriginRef topOrigin, WKSpeechRecognitionPermissionCallbackRef callback);
    141141
  • trunk/Source/WebKitLegacy/mac/ChangeLog

    r290117 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-18  Saam Barati  <sbarati@apple.com>
    220
  • trunk/Source/WebKitLegacy/mac/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3636SDKROOT_YES = macosx.internal;
    3737
     38OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     39COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     40
    3841WK_BUILD_FOR_TESTING = YES;
    3942
  • trunk/Source/bmalloc/ChangeLog

    r290110 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * Configurations/DebugRelease.xcconfig:
     18
    1192022-02-17  Yusuke Suzuki  <ysuzuki@apple.com>
    220
  • trunk/Source/bmalloc/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3535SDKROOT_YES = macosx.internal;
    3636
     37OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     38COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     39
    3740WK_DEFAULT_LTO_MODE = $(WK_USER_LTO_MODE_none);
    3841
  • trunk/Tools/ChangeLog

    r290148 r290149  
     12022-02-18  Brandon Stewart  <brandonstewart@apple.com>
     2
     3        Generate compile_commands.json on macOS Builds
     4        https://bugs.webkit.org/show_bug.cgi?id=235686
     5
     6        Reviewed by Saam Barati.
     7
     8        Add support for generating compile_commands.json file to WebKit.
     9       
     10        compile_commands.json can be used by tools like clangd to provide code complete,
     11        refactoring, formatting, and cross references.
     12
     13        Steps to generate the compile commands file:
     14        make r EXPORT_COMPILE_COMMANDS=YES
     15        generate-compile-commands WebKitBuild/Release
     16
     17        * ContentExtensionTester/Configurations/DebugRelease.xcconfig:
     18        * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
     19        * ImageDiff/cg/Configurations/DebugRelease.xcconfig:
     20        * MiniBrowser/Configurations/DebugRelease.xcconfig:
     21        * Scripts/build-jsc:
     22        * Scripts/build-webkit:
     23        * Scripts/generate-compile-commands: Added.
     24        * TestWebKitAPI/Configurations/DebugRelease.xcconfig:
     25        * WebEditingTester/Configurations/DebugRelease.xcconfig:
     26        * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
     27        * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig:
     28
    1292022-02-18  Jonathan Bedard  <jbedard@apple.com>
    230
  • trunk/Tools/ContentExtensionTester/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3232SDKROOT_ = macosx;
    3333SDKROOT_YES = macosx.internal;
     34
     35OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     36COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
  • trunk/Tools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3838SDKROOT_YES = macosx.internal;
    3939
     40OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     41COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     42
    4043WK_CCACHE_DIR = $(SRCROOT)/../ccache;
    4144#include "../../../ccache/ccache.xcconfig"
  • trunk/Tools/ImageDiff/cg/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3131SDKROOT_ = macosx;
    3232SDKROOT_YES = macosx.internal;
     33
     34OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     35COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
  • trunk/Tools/MiniBrowser/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3535SDKROOT_YES = macosx.internal;
    3636
     37OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     38COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     39
    3740WK_CCACHE_DIR = $(SRCROOT)/../ccache;
    3841#include? "../../ccache/ccache.xcconfig"
  • trunk/Tools/Scripts/build-jsc

    r268870 r290149  
    6262my $startTime = time();
    6363my $useCCache = -1;
     64my $exportCompileCommands = 0;
    6465
    6566my @features = getFeatureOptionList();
    … …  
    9495
    9596  --[no-]use-ccache             Enable (or disable) CCache, if available
     97  --export-compile-commands     Generate compile_commands.json (Apple platforms only)
    9698EOF
    9799
    … …  
    106108    'cmakeargs=s' => \@cmakeArgs,
    107109    'build-dir=s' => \$buildDir,
    108     'use-ccache!' => \$useCCache
     110    'use-ccache!' => \$useCCache,
     111    'export-compile-commands' => \$exportCompileCommands
    109112);
    110113
    … …  
    142145    $ENV{'WK_USE_CCACHE'} = "NO";
    143146}
     147
     148$ENV{'EXPORT_COMPILE_COMMANDS'} = "YES" if $exportCompileCommands;
    144149
    145150checkRequiredSystemConfig();
  • trunk/Tools/Scripts/build-webkit

    r288742 r290149  
    8181my $skipLibraryUpdate = 0;
    8282my $useCCache = -1;
     83my $exportCompileCommands = 0;
    8384
    8485my @features = getFeatureOptionList();
    … …  
    147148  --[no-]use-ccache                 Enable (or disable) CCache, if available
    148149
     150  --export-compile-commands         Generate compile_commands.json (Apple platforms only)
     151
    149152EOF
    150153
    … …  
    168171    'skip-library-update' => \$skipLibraryUpdate,
    169172    'use-ccache!' => \$useCCache,
     173    'export-compile-commands' => \$exportCompileCommands
    170174);
    171175
    … …  
    192196}
    193197
     198$ENV{'EXPORT_COMPILE_COMMANDS'} = "YES" if $exportCompileCommands;
    194199
    195200my $productDir = productDir();
  • trunk/Tools/TestWebKitAPI/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3535SDKROOT_YES = macosx.internal;
    3636
     37OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     38COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     39
    3740OTHER_CPLUSPLUSFLAGS = $(inherited) -ftemplate-depth=256;
    3841
  • trunk/Tools/WebEditingTester/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3333SDKROOT_ = macosx;
    3434SDKROOT_YES = macosx.internal;
     35
     36OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     37COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
  • trunk/Tools/WebKitTestRunner/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3333SDKROOT_YES = macosx.internal;
    3434
     35OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     36COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     37
    3538WK_CCACHE_DIR = $(SRCROOT)/../ccache;
    3639#include "../../ccache/ccache.xcconfig"
  • trunk/Tools/lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig

    r286958 r290149  
    3333SDKROOT_YES = macosx.internal;
    3434
     35OTHER_CFLAGS = $(inherited) $(COMPILE_COMMANDS_$(EXPORT_COMPILE_COMMANDS));
     36COMPILE_COMMANDS_YES = '-gen-cdb-fragment-path' '$(BUILT_PRODUCTS_DIR)/compile_commands';
     37
    3538WK_CCACHE_DIR = $(SRCROOT)/../../../Tools/ccache;
    3639#include "../../../ccache/ccache.xcconfig"
Note: See TracChangeset for help on using the changeset viewer.