Priority: Not Evaluated
Resolution: Won't Do
Affects Version/s: 5.15.8
Fix Version/s: None
In an attempt to modularize building of QtWebEngine 5.15.x, I looked into whether the GN bundled in qtwebengine-chromium could be built separately (I understand that doing so is likely unsupported). I notice various things appear to be currently broken in the gn_unittests target; I am reporting these in case others are interested and/or had expected it to work. What is described in this report does not impact ordinary builds of QtWebEngine 5.15.x, which only build the gn target.
- The file gn/src/gn/function_filter_unittest.cc (from backport commit 84164e4) is not in the path specified in executables['gn_unittests']['sources'] of gn/build/gen.py. Presumably the file should be moved to gn/tools/gn/, where the rest of the unit test files reside.
- gn/tools/gn/ninja_target_command_util_unittest.cc (from backport commit 677e14d0) uses ESCAPE_SPACE, and so does not compile without backporting GN upstream commit 5624679 (as well as adjusting the signature of EscapeStringToString_Space() so that it accepts a const base::StringPiece& instead of a const std::string_view&).
- Multiple files seem to need include header path adjustment (possibly by prepending "tools/"). The affected source files and include headers are:
gn/tools/gn/function_filter_unittest.cc: gn/functions.h, gn/test_with_scope.h
- gn/tools/gn/qmake_link_writer_unittest.cc does not compile because a pointer to NinjaBinaryTargetWriter writer is being passed to the QMakeLinkWriter constructor, which expects const NinjaCBinaryTargetWriter * i.e. a pointer to a child class of NinjaBinaryTargetWriter (see gn/tools/gn/qmake_link_writer.h). Possible fixes could be to have the unit test file instead declare writer as NinjaCBinaryTargetWriter (and include ninja_c_binary_target_writer.h instead of ninja_binary_target_writer.h), or have the QMakeLinkWriter constructor instead expect const NinjaBinaryTargetWriter * (as currently done on qtwebengine-chromium branch 69-based), but I do not know which approach is correct/preferred.