<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>186273</bug_id>
          
          <creation_ts>2018-06-04 09:35:28 -0700</creation_ts>
          <short_desc>-fvar-tracking-assignments warning from BuiltinNames.cpp</short_desc>
          <delta_ts>2019-04-08 13:23:31 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>ross.kirsling</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1429840</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-04 09:35:28 -0700</bug_when>
    <thetext>This is annoying:

[272/1837] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource24.cpp.o
In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource24.cpp:3:
/home/mcatanzaro/Projects/WebKit/Source/JavaScriptCore/builtins/BuiltinNames.cpp: In constructor ‘JSC::BuiltinNames::BuiltinNames(JSC::VM*, JSC::CommonIdentifiers*)’:
/home/mcatanzaro/Projects/WebKit/Source/JavaScriptCore/builtins/BuiltinNames.cpp:53:1: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 BuiltinNames::BuiltinNames(VM* vm, CommonIdentifiers* commonIdentifiers)
 ^~~~~~~~~~~~

I tried to fix it a few weeks ago by moving the code from BuiltinNames.h to BuiltinNames.cpp, and adding some code to Source/JavaScriptCore/CMakeLists.txt:

# Avoid &quot;variable tracking size limit exceeded&quot;
set_source_files_properties(builtins/BuiltinNames.cpp PROPERTIES COMPILE_FLAGS -fno-var-tracking-assignments)

I thought that fixed it, but in fact it does nothing since BuiltinNames.cpp is not a build target... UnifiedSource24.cpp is the real build target. Drat. The warning went away for me because the file was simply not recompiled, because its build flags did not change like I thought they had, tricking me into thinking I had fixed it.

This will probably be tricky to fix. We could add a CMake macro to propagate compiler flags from a given source file to the corresponding unified source file, or we could just rewrite the BuiltinNames constructor (probably saner).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1429844</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-06-04 09:42:40 -0700</bug_when>
    <thetext>We should probably also audit other uses of set_source_file_properties as they&apos;re likely broken:

JavaScriptCore/CMakeLists.txt:    set_source_files_properties(builtins/BuiltinNames.cpp PROPERTIES COMPIL
E_FLAGS -fno-var-tracking-assignments)
JavaScriptCore/shell/PlatformMac.cmake:set_source_files_properties(${TESTAPI_OBJC_SOURCES} PROPERTIES COM
PILE_FLAGS -fobjc-arc)
JavaScriptCore/shell/PlatformWin.cmake:set_source_files_properties(../API/tests/CustomGlobalObjectClassTe
st.c PROPERTIES COMPILE_FLAGS &quot;/TP&quot;)
JavaScriptCore/shell/PlatformWin.cmake:set_source_files_properties(../API/tests/testapi.c PROPERTIES COMP
ILE_FLAGS &quot;/TP&quot;)
ThirdParty/libwebrtc/Source/third_party/protobuf/cmake/protobuf-module.cmake.in:  set_source_files_proper
ties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE)
ThirdParty/openvr/src/CMakeLists.txt:    set_source_files_properties(vrcommon/pathtools_public.cpp vrcomm
on/vrpathregistry_public.cpp PROPERTIES COMPILE_FLAGS &quot;
-x objective-c++&quot;)
WebCore/ChangeLog-2015-11-21:        because CMake can only set COMPILE_FLAGS once with set_source_files_properties, and we want 
WebCore/PlatformGTK.cmake:    set_source_files_properties(${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)
WebCore/platform/GStreamer.cmake:    set_source_files_properties(platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp PROPERTIES COMPILE_DEFINITIONS &quot;GLIB_DISABLE_DEPRECATION_WARNINGS=1&quot;)
WebKitLegacy/PlatformMac.cmake:        set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS &quot;-ObjC++ -std=c++17&quot;)
WebKitLegacy/PlatformMac.cmake:        set_source_files_properties(${_file} PROPERTIES COMPILE_FLAGS -std=c99)
WebKitLegacy/PlatformWin.cmake:    set_source_files_properties(${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/${_filewe}.h PROPERTIES GENERATED TRUE)
WebKitLegacy/PlatformWin.cmake:    set_source_files_properties(${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/${_filewe}_i.c PROPERTIES GENERATED TRUE)
cmake/WebKitMacros.cmake:        set_source_files_properties(${_sourceFileTmp} PROPERTIES HEADER_FILE_ONLY ON)
cmake/WebKitMacros.cmake:    set_source_files_properties(${_source} PROPERTIES OBJECT_DEPENDS &quot;${_tmp}&quot;)
cmake/WebKitMacros.cmake:            set_source_files_properties(${_cpp}
cmake/WebKitMacros.cmake:            set_source_files_properties(${_cpp}
cmake/WebKitMacros.cmake:        set_source_files_properties(${_sources}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1479348</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-11-16 05:05:08 -0800</bug_when>
    <thetext>I tried to change BuiltinNames.cpp so it would be built non-unified, but I couldn&apos;t get it to li nk, and I didn&apos;t understand why.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525306</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2019-04-08 13:01:53 -0700</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #1)
&gt; We should probably also audit other uses of set_source_file_properties as
&gt; they&apos;re likely broken:

Bug #196703</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1525321</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Kirsling">ross.kirsling</who>
    <bug_when>2019-04-08 13:23:31 -0700</bug_when>
    <thetext>Closing per the suggestion in bug 196699 comment 3 that this issue no longer occurs with GCC 9.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>