Index: head/www/chromium/Makefile =================================================================== --- head/www/chromium/Makefile (revision 503333) +++ head/www/chromium/Makefile (revision 503334) @@ -1,342 +1,341 @@ # Created by: Florent Thoumie # $FreeBSD$ PORTNAME= chromium -PORTVERSION= 74.0.3729.157 -PORTREVISION= 1 +PORTVERSION= 74.0.3729.169 CATEGORIES?= www MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \ LOCAL/cpm/chromium/:fonts DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER?= chromium@FreeBSD.org COMMENT?= Google web browser based on WebKit LICENSE= BSD3CLAUSE LGPL21 MPL11 LICENSE_COMB= multi BUILD_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}ply>0:devel/py-ply@${PY_FLAVOR} \ .if !defined(GN_ONLY) BUILD_DEPENDS+= gperf:devel/gperf \ yasm:devel/yasm \ ffmpeg>=3.2.2,1:multimedia/ffmpeg \ flock:sysutils/flock \ node:www/node \ ${LOCALBASE}/bin/ar:devel/binutils \ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \ ${LOCALBASE}/share/usbids/usb.ids:misc/usbids \ ${PYTHON_PKGNAMEPREFIX}html5lib>0:www/py-html5lib@${PY_FLAVOR} .endif .if !defined(GN_ONLY) LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \ libatspi.so:accessibility/at-spi2-core \ libspeechd.so:accessibility/speech-dispatcher \ libsnappy.so:archivers/snappy \ libFLAC.so:audio/flac \ libopus.so:audio/opus \ libspeex.so:audio/speex \ libdbus-1.so:devel/dbus \ libdbus-glib-1.so:devel/dbus-glib \ libicuuc.so:devel/icu \ libjsoncpp.so:devel/jsoncpp \ libpci.so:devel/libpci \ libnspr4.so:devel/nspr \ libre2.so:devel/re2 \ libcairo.so:graphics/cairo \ libdrm.so:graphics/libdrm \ libexif.so:graphics/libexif \ libpng.so:graphics/png \ libwebp.so:graphics/webp \ libavcodec.so:multimedia/ffmpeg \ libopenh264.so:multimedia/openh264 \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libharfbuzz-icu.so:print/harfbuzz-icu \ libgcrypt.so:security/libgcrypt \ libsecret-1.so:security/libsecret \ libnss3.so:security/nss \ libexpat.so:textproc/expat2 \ libfontconfig.so:x11-fonts/fontconfig RUN_DEPENDS= xdg-open:devel/xdg-utils \ noto-basic>0:x11-fonts/noto-basic BROKEN_FreeBSD_11_aarch64= components/safe_browsing_db/v4_rice.cc:120:18: use of overloaded operator '&' is ambiguous ONLY_FOR_ARCHS= aarch64 amd64 i386 .endif .if defined(GN_ONLY) USES= compiler:c++14-lang dos2unix localbase:ldflags ninja pkgconfig \ python:2.7,build shebangfix tar:xz .else USES= bison cpe desktop-file-utils dos2unix gl gnome jpeg localbase:ldflags \ ninja perl5 pkgconfig python:2.7,build shebangfix tar:xz .endif MAKE_ARGS= -C out/${BUILDTYPE} BINARY_ALIAS= python=${PYTHON_CMD} DOS2UNIX_FILES= third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h .if !defined(GN_ONLY) CPE_VENDOR= google CPE_PRODUCT= chrome USE_GL= gl USE_LDCONFIG= ${DATADIR} USE_PERL5= build USE_XORG= x11 xcb xcomposite xcursor xext xdamage xfixes xi \ xorgproto xrandr xrender xscrnsaver xtst USE_GNOME= atk dconf glib20 gtk30 libxml2 libxslt SHEBANG_FILES= chrome/tools/build/linux/chrome-wrapper ALL_TARGET= chrome INSTALLS_ICONS= yes .endif EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang # TODO bz@ : install libwidevinecdm.so (see third_party/widevine/cdm/BUILD.gn) # # Run "./out/${BUILDTYPE}/gn args out/${BUILDTYPE} --list" for all variables. # Some parts don't have use_system_* flag, and can be turned on/off by using # replace_gn_files.py script, some parts just turned on/off for target host # OS "target_os == is_bsd", like libusb, libpci. GN_ARGS+= clang_use_chrome_plugins=false \ enable_hangout_services_extension=true \ enable_nacl=false \ enable_one_click_signin=true \ enable_remoting=false \ fieldtrial_testing_like_official_build=true \ is_clang=true \ jumbo_file_merge_limit=8 \ toolkit_views=true \ treat_warnings_as_errors=false \ use_allocator="none" \ use_allocator_shim=false \ use_aura=true \ use_bundled_fontconfig=false \ use_custom_libcxx=false \ use_gnome_keyring=false \ use_jumbo_build=true \ use_lld=true \ use_sysroot=false \ use_system_freetype=true \ use_system_harfbuzz=true \ use_system_libjpeg=true \ extra_cxxflags="${CXXFLAGS}" \ extra_ldflags="${LDFLAGS}" # TODO: investigate building with these options: # use_system_minigbm GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles # FreeBSD Chromium Api Key # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. GN_ARGS+= google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" \ google_default_client_id="996322985003.apps.googleusercontent.com" \ google_default_client_secret="IR1za9-1VK0zZ0f_O8MVFicn" .if !defined(GN_ONLY) SUB_FILES= chromium-browser.desktop chrome pkg-message SUB_LIST+= COMMENT="${COMMENT}" OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER KERBEROS TEST CODECS_DESC= Compile and enable patented codecs like H.264 DRIVER_DESC= Install chromedriver OPTIONS_GROUP= AUDIO OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO OPTIONS_DEFAULT= ALSA CODECS CUPS DRIVER KERBEROS OPTIONS_SUB= yes ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \ alsa-lib>=1.1.1_1:audio/alsa-lib ALSA_VARS= GN_ARGS+=use_alsa=true ALSA_VARS_OFF= GN_ARGS+=use_alsa=false CODECS_VARS= GN_ARGS+=ffmpeg_branding="Chrome" \ GN_ARGS+=proprietary_codecs=true \ GN_ARGS+=enable_hevc_demuxing=true CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \ GN_ARGS+=proprietary_codecs=false \ GN_ARGS+=enable_hevc_demuxing=false CUPS_LIB_DEPENDS= libcups.so:print/cups CUPS_VARS= GN_ARGS+=use_cups=true CUPS_VARS_OFF= GN_ARGS+=use_cups=false DEBUG_VARS= BUILDTYPE=Debug \ GN_ARGS+=is_debug=true \ GN_ARGS+=is_component_build=false \ GN_BOOTSTRAP_FLAGS+=--debug \ WANTSPACE="lots of free disk space (~ 13GB)" DEBUG_VARS_OFF= BUILDTYPE=Release \ GN_ARGS+=is_debug=false \ GN_ARGS+=is_official_build=true \ GN_ARGS+=symbol_level=0 \ GN_ARGS+=remove_webcore_debug_symbols=true \ WANTSPACE="a fair amount of free disk space (~ 6.5GB)" DRIVER_MAKE_ARGS= chromedriver KERBEROS_VARS= GN_ARGS+=use_kerberos=true KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false # With SNDIO=on we exclude audio_manager_linux from the build (see # media/audio/BUILD.gn) and use audio_manager_openbsd which does not # support falling back to ALSA or PulseAudio. SNDIO_PREVENTS= ALSA PULSEAUDIO SNDIO_LIB_DEPENDS= libsndio.so:audio/sndio SNDIO_VARS= GN_ARGS+=use_sndio=true SNDIO_VARS_OFF= GN_ARGS+=use_sndio=false .endif .include "Makefile.tests" TEST_ALL_TARGET= ${TEST_TARGETS} TEST_DISTFILES= ${PORTNAME}-${DISTVERSION}-testdata${EXTRACT_SUFX} \ test_fonts${EXTRACT_SUFX}:fonts .include # swiftshader/lib/{libEGL.so,libGLESv2.so} is x86 only .if ${ARCH} == aarch64 PLIST_SUB+= NOT_AARCH64="@comment " .else PLIST_SUB+= NOT_AARCH64="" .endif # Make better javascript with java .if !defined(GN_ONLY) JAVA_BUILD= yes JAVA_VERSION= 1.8 USE_JAVA= yes .endif # Allow relocations against read-only segments (override lld default) LDFLAGS_i386= -Wl,-znotext # TODO: -isystem, would be just as ugly as this approach, but more reliably # build would fail without C_INCLUDE_PATH/CPLUS_INCLUDE_PATH env var set. MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \ CPLUS_INCLUDE_PATH=${LOCALBASE}/include .if !defined(GN_ONLY) pre-everything:: @${ECHO_MSG} @${ECHO_MSG} "To build Chromium, you should have around 2GB of memory" @${ECHO_MSG} "and ${WANTSPACE}." @${ECHO_MSG} post-extract-TEST-on: @${MKDIR} ${WRKSRC}/third_party/test_fonts/test_fonts @${MV} ${WRKDIR}/test_fonts ${WRKSRC}/third_party/test_fonts/ post-patch: @${REINPLACE_CMD} -e 's|@@PACKAGE@@|chromium|' \ -e 's|@@MENUNAME@@|Chromium Web Browser|' \ ${WRKSRC}/chrome/app/resources/manpage.1.in post-patch-SNDIO-on: @${MKDIR} ${WRKSRC}/media/audio/sndio ${WRKSRC}/media/audio/openbsd @${CP} ${FILESDIR}/sndio_output.* ${WRKSRC}/media/audio/sndio @${CP} ${FILESDIR}/sndio_input.* ${WRKSRC}/media/audio/sndio @${CP} ${FILESDIR}/audio_manager_openbsd.* ${WRKSRC}/media/audio/openbsd pre-configure: # We used to remove bundled libraries to be sure that chromium uses # system libraries and not shipped ones. # cd ${WRKSRC} && ${PYTHON_CMD} \ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved] cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \ ./build/linux/unbundle/replace_gn_files.py --system-libraries \ ffmpeg flac freetype harfbuzz-ng libdrm libusb libwebp libxml libxslt openh264 opus snappy yasm || ${FALSE} .endif do-configure: # GN generator bootstrapping and generating ninja files cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS} .if !defined(GN_ONLY) cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn \ gen --args='${GN_ARGS}' out/${BUILDTYPE} # Setup nodejs dependency @${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin/node # Setup java dependency on amd64 and i386 .if ${ARCH} == amd64 || ${ARCH} == i386 @${MKDIR} ${WRKDIR}/bin ${LN} -sf ${LOCALBASE}/openjdk8/bin/java ${WRKDIR}/bin/java .endif .endif do-test-TEST-on: .for t in ${TEST_TARGETS} cd ${WRKSRC}/out/${BUILDTYPE} && ${SETENV} LC_ALL=en_US.UTF-8 \ ./${t} --gtest_filter=-${EXCLUDE_${t}:ts:} || ${TRUE} .endfor .if !defined(GN_ONLY) do-install: @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in \ ${STAGEDIR}${MANPREFIX}/man/man1/chrome.1 .for s in 22 24 48 64 128 256 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps ${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${s}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}x${s}/apps/chrome.png .endfor ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.png ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*.pak ${STAGEDIR}${DATADIR} .for d in protoc icudtl.dat mksnapshot natives_blob.bin snapshot_blob.bin v8_context_snapshot.bin ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${d} ${STAGEDIR}${DATADIR} .endfor ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chrome \ ${STAGEDIR}${DATADIR} cd ${WRKSRC}/out/${BUILDTYPE} && \ ${COPYTREE_SHARE} "locales resources" ${STAGEDIR}${DATADIR} @${MKDIR} ${STAGEDIR}${DESKTOPDIR} ${INSTALL_DATA} ${WRKDIR}/chromium-browser.desktop \ ${STAGEDIR}${DESKTOPDIR} ${INSTALL_SCRIPT} ${WRKDIR}/chrome ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/chrome/tools/build/linux/chrome-wrapper \ ${STAGEDIR}${DATADIR} # ANGLE .for f in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR} .endfor # SwiftShader .if ${ARCH} != aarch64 @${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader .for g in libEGL.so libGLESv2.so ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${g} \ ${STAGEDIR}${DATADIR}/swiftshader .endfor .endif post-install-DEBUG-on: ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/*.so \ ${STAGEDIR}${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/character_data_generator \ ${STAGEDIR}${DATADIR} post-install-DRIVER-on: ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver \ ${STAGEDIR}${PREFIX}/bin .endif .include Index: head/www/chromium/distinfo =================================================================== --- head/www/chromium/distinfo (revision 503333) +++ head/www/chromium/distinfo (revision 503334) @@ -1,7 +1,7 @@ -TIMESTAMP = 1558103760 -SHA256 (chromium-74.0.3729.157.tar.xz) = dcbe311d6ba7124496beca4a7ae401ac072c1f8e1a47d17b0919dba1b5962e06 -SIZE (chromium-74.0.3729.157.tar.xz) = 743051004 -SHA256 (chromium-74.0.3729.157-testdata.tar.xz) = fccea72fcbe732495fbfe2b22815fc0a238b459fa88e8fa2ddfc8aaa52492ff9 -SIZE (chromium-74.0.3729.157-testdata.tar.xz) = 350162436 +TIMESTAMP = 1559408741 +SHA256 (chromium-74.0.3729.169.tar.xz) = 070f0210017f54b65264f88726431da7582e36a04caa673fe50662e8b41a0cb4 +SIZE (chromium-74.0.3729.169.tar.xz) = 749495820 +SHA256 (chromium-74.0.3729.169-testdata.tar.xz) = b0799bd6f9854778397e8946b6e02ad409e5ad305547e8ee5cf8865f04e91945 +SIZE (chromium-74.0.3729.169-testdata.tar.xz) = 350168484 SHA256 (test_fonts.tar.xz) = cf9cbe3b7f1c4c42d426bddc65ec178d333ad7e205a36fe0a606a3c0c545ece1 SIZE (test_fonts.tar.xz) = 200040 Index: head/www/chromium/files/patch-fix-gn-74 =================================================================== --- head/www/chromium/files/patch-fix-gn-74 (nonexistent) +++ head/www/chromium/files/patch-fix-gn-74 (revision 503334) @@ -0,0 +1,716 @@ +--- tools/gn/build/gen.py.orig 2019-06-01 16:49:59 UTC ++++ tools/gn/build/gen.py +@@ -530,6 +530,7 @@ def WriteGNNinja(path, platform, host, options): + 'tools/gn/setup.cc', + 'tools/gn/source_dir.cc', + 'tools/gn/source_file.cc', ++ 'tools/gn/source_file_type.cc', + 'tools/gn/standard_out.cc', + 'tools/gn/string_utils.cc', + 'tools/gn/substitution_list.cc', +--- tools/gn/tools/gn/binary_target_generator.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/binary_target_generator.cc +@@ -68,38 +68,6 @@ void BinaryTargetGenerator::DoRun() { + return; + } + +-bool BinaryTargetGenerator::FillSources() { +- bool ret = TargetGenerator::FillSources(); +- for (std::size_t i = 0; i < target_->sources().size(); ++i) { +- const auto& source = target_->sources()[i]; +- switch (source.type()) { +- case SourceFile::SOURCE_CPP: +- case SourceFile::SOURCE_H: +- case SourceFile::SOURCE_C: +- case SourceFile::SOURCE_M: +- case SourceFile::SOURCE_MM: +- case SourceFile::SOURCE_S: +- case SourceFile::SOURCE_ASM: +- case SourceFile::SOURCE_O: +- // These are allowed. +- break; +- case SourceFile::SOURCE_RC: +- case SourceFile::SOURCE_DEF: +- case SourceFile::SOURCE_RS: +- case SourceFile::SOURCE_GO: +- case SourceFile::SOURCE_UNKNOWN: +- case SourceFile::SOURCE_NUMTYPES: +- *err_ = +- Err(scope_->GetValue(variables::kSources, true)->list_value()[i], +- std::string("Only source, header, and object files belong in " +- "the sources of a ") + +- Target::GetStringForOutputType(target_->output_type()) + +- ". " + source.value() + " is not one of the valid types."); +- } +- } +- return ret; +-} +- + bool BinaryTargetGenerator::FillCompleteStaticLib() { + if (target_->output_type() == Target::STATIC_LIBRARY) { + const Value* value = scope_->GetValue(variables::kCompleteStaticLib, true); +--- tools/gn/tools/gn/binary_target_generator.h.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/binary_target_generator.h +@@ -22,7 +22,6 @@ class BinaryTargetGenerator : public TargetGenerator { + + protected: + void DoRun() override; +- bool FillSources() override; + + private: + bool FillCompleteStaticLib(); +--- tools/gn/tools/gn/c_tool.h.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/c_tool.h +@@ -12,6 +12,7 @@ + #include "tools/gn/label.h" + #include "tools/gn/label_ptr.h" + #include "tools/gn/scope.h" ++#include "tools/gn/source_file_type.h" + #include "tools/gn/substitution_list.h" + #include "tools/gn/substitution_pattern.h" + #include "tools/gn/tool.h" +--- tools/gn/tools/gn/compile_commands_writer.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/compile_commands_writer.cc +@@ -122,7 +122,7 @@ void WriteCommand(const Target* target, + const CompileFlags& flags, + std::vector& tool_outputs, + PathOutput& path_output, +- SourceFile::Type source_type, ++ SourceFileType source_type, + const char* tool_name, + EscapeOptions opts, + std::string* compile_commands) { +@@ -144,16 +144,16 @@ void WriteCommand(const Target* target, + } else if (range.type == &CSubstitutionCFlags) { + command_out << flags.cflags; + } else if (range.type == &CSubstitutionCFlagsC) { +- if (source_type == SourceFile::SOURCE_C) ++ if (source_type == SOURCE_C) + command_out << flags.cflags_c; + } else if (range.type == &CSubstitutionCFlagsCc) { +- if (source_type == SourceFile::SOURCE_CPP) ++ if (source_type == SOURCE_CPP) + command_out << flags.cflags_cc; + } else if (range.type == &CSubstitutionCFlagsObjC) { +- if (source_type == SourceFile::SOURCE_M) ++ if (source_type == SOURCE_M) + command_out << flags.cflags_objc; + } else if (range.type == &CSubstitutionCFlagsObjCc) { +- if (source_type == SourceFile::SOURCE_MM) ++ if (source_type == SOURCE_MM) + command_out << flags.cflags_objcc; + } else if (range.type == &SubstitutionLabel || + range.type == &SubstitutionLabelName || +@@ -222,11 +222,9 @@ void CompileCommandsWriter::RenderJSON(const BuildSett + for (const auto& source : target->sources()) { + // If this source is not a C/C++/ObjC/ObjC++ source (not header) file, + // continue as it does not belong in the compilation database. +- SourceFile::Type source_type = source.type(); +- if (source_type != SourceFile::SOURCE_CPP && +- source_type != SourceFile::SOURCE_C && +- source_type != SourceFile::SOURCE_M && +- source_type != SourceFile::SOURCE_MM) ++ SourceFileType source_type = GetSourceFileType(source); ++ if (source_type != SOURCE_CPP && source_type != SOURCE_C && ++ source_type != SOURCE_M && source_type != SOURCE_MM) + continue; + + const char* tool_name = Tool::kToolNone; +@@ -324,4 +322,4 @@ void CompileCommandsWriter::VisitDeps(const Target* ta + VisitDeps(pair.ptr, visited); + } + } +-} ++} +\ No newline at end of file +--- tools/gn/tools/gn/general_tool.h.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/general_tool.h +@@ -11,6 +11,7 @@ + #include "base/macros.h" + #include "tools/gn/label.h" + #include "tools/gn/label_ptr.h" ++#include "tools/gn/source_file_type.h" + #include "tools/gn/substitution_list.h" + #include "tools/gn/substitution_pattern.h" + #include "tools/gn/tool.h" +--- tools/gn/tools/gn/header_checker.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/header_checker.cc +@@ -18,6 +18,7 @@ + #include "tools/gn/err.h" + #include "tools/gn/filesystem_utils.h" + #include "tools/gn/scheduler.h" ++#include "tools/gn/source_file_type.h" + #include "tools/gn/target.h" + #include "tools/gn/trace.h" + #include "util/worker_pool.h" +@@ -151,10 +152,9 @@ void HeaderChecker::RunCheckOverFiles(const FileMap& f + + for (const auto& file : files) { + // Only check C-like source files (RC files also have includes). +- SourceFile::Type type = file.first.type(); +- if (type != SourceFile::SOURCE_CPP && type != SourceFile::SOURCE_H && +- type != SourceFile::SOURCE_C && type != SourceFile::SOURCE_M && +- type != SourceFile::SOURCE_MM && type != SourceFile::SOURCE_RC) ++ SourceFileType type = GetSourceFileType(file.first); ++ if (type != SOURCE_CPP && type != SOURCE_H && type != SOURCE_C && ++ type != SOURCE_M && type != SOURCE_MM && type != SOURCE_RC) + continue; + + if (!check_generated_) { +--- tools/gn/tools/gn/ninja_binary_target_writer.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/ninja_binary_target_writer.cc +@@ -23,23 +23,22 @@ + #include "tools/gn/ninja_utils.h" + #include "tools/gn/scheduler.h" + #include "tools/gn/settings.h" ++#include "tools/gn/source_file_type.h" + #include "tools/gn/string_utils.h" + #include "tools/gn/substitution_writer.h" + #include "tools/gn/target.h" + + bool NinjaBinaryTargetWriter::SourceFileTypeSet::CSourceUsed() { +- return Get(SourceFile::SOURCE_CPP) || Get(SourceFile::SOURCE_H) || +- Get(SourceFile::SOURCE_C) || Get(SourceFile::SOURCE_M) || +- Get(SourceFile::SOURCE_MM) || Get(SourceFile::SOURCE_RC) || +- Get(SourceFile::SOURCE_S); ++ return Get(SOURCE_CPP) || Get(SOURCE_H) || Get(SOURCE_C) || Get(SOURCE_M) || ++ Get(SOURCE_MM) || Get(SOURCE_RC) || Get(SOURCE_S); + } + + bool NinjaBinaryTargetWriter::SourceFileTypeSet::RustSourceUsed() { +- return Get(SourceFile::SOURCE_RS); ++ return Get(SOURCE_RS); + } + + bool NinjaBinaryTargetWriter::SourceFileTypeSet::GoSourceUsed() { +- return Get(SourceFile::SOURCE_GO); ++ return Get(SOURCE_GO); + } + + NinjaBinaryTargetWriter::NinjaBinaryTargetWriter(const Target* target, +@@ -50,6 +49,10 @@ NinjaBinaryTargetWriter::NinjaBinaryTargetWriter(const + NinjaBinaryTargetWriter::~NinjaBinaryTargetWriter() = default; + + void NinjaBinaryTargetWriter::Run() { ++ SourceFileTypeSet used_types; ++ for (const auto& source : target_->sources()) ++ used_types.Set(GetSourceFileType(source)); ++ + NinjaCBinaryTargetWriter writer(target_, out_); + writer.Run(); + } +--- tools/gn/tools/gn/ninja_binary_target_writer.h.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/ninja_binary_target_writer.h +@@ -23,12 +23,11 @@ class NinjaBinaryTargetWriter : public NinjaTargetWrit + class SourceFileTypeSet { + public: + SourceFileTypeSet() { +- memset(flags_, 0, +- sizeof(bool) * static_cast(SourceFile::SOURCE_NUMTYPES)); ++ memset(flags_, 0, sizeof(bool) * static_cast(SOURCE_NUMTYPES)); + } + +- void Set(SourceFile::Type type) { flags_[static_cast(type)] = true; } +- bool Get(SourceFile::Type type) const { ++ void Set(SourceFileType type) { flags_[static_cast(type)] = true; } ++ bool Get(SourceFileType type) const { + return flags_[static_cast(type)]; + } + +@@ -37,7 +36,7 @@ class NinjaBinaryTargetWriter : public NinjaTargetWrit + bool GoSourceUsed(); + + private: +- bool flags_[static_cast(SourceFile::SOURCE_NUMTYPES)]; ++ bool flags_[static_cast(SOURCE_NUMTYPES)]; + }; + + NinjaBinaryTargetWriter(const Target* target, std::ostream& out); +--- tools/gn/tools/gn/ninja_c_binary_target_writer.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/ninja_c_binary_target_writer.cc +@@ -24,6 +24,7 @@ + #include "tools/gn/ninja_utils.h" + #include "tools/gn/scheduler.h" + #include "tools/gn/settings.h" ++#include "tools/gn/source_file_type.h" + #include "tools/gn/string_utils.h" + #include "tools/gn/substitution_writer.h" + #include "tools/gn/target.h" +@@ -66,27 +67,27 @@ void AddSourceSetObjectFiles(const Target* source_set, + if (source_set->GetOutputFilesForSource(source, &tool_name, &tool_outputs)) + obj_files->push_back(tool_outputs[0]); + +- used_types.Set(source.type()); ++ used_types.Set(GetSourceFileType(source)); + } + + // Add MSVC precompiled header object files. GCC .gch files are not object + // files so they are omitted. + if (source_set->config_values().has_precompiled_headers()) { +- if (used_types.Get(SourceFile::SOURCE_C)) { ++ if (used_types.Get(SOURCE_C)) { + const CTool* tool = source_set->toolchain()->GetToolAsC(CTool::kCToolCc); + if (tool && tool->precompiled_header_type() == CTool::PCH_MSVC) { + GetPCHOutputFiles(source_set, CTool::kCToolCc, &tool_outputs); + obj_files->Append(tool_outputs.begin(), tool_outputs.end()); + } + } +- if (used_types.Get(SourceFile::SOURCE_CPP)) { ++ if (used_types.Get(SOURCE_CPP)) { + const CTool* tool = source_set->toolchain()->GetToolAsC(CTool::kCToolCxx); + if (tool && tool->precompiled_header_type() == CTool::PCH_MSVC) { + GetPCHOutputFiles(source_set, CTool::kCToolCxx, &tool_outputs); + obj_files->Append(tool_outputs.begin(), tool_outputs.end()); + } + } +- if (used_types.Get(SourceFile::SOURCE_M)) { ++ if (used_types.Get(SOURCE_M)) { + const CTool* tool = + source_set->toolchain()->GetToolAsC(CTool::kCToolObjC); + if (tool && tool->precompiled_header_type() == CTool::PCH_MSVC) { +@@ -94,7 +95,7 @@ void AddSourceSetObjectFiles(const Target* source_set, + obj_files->Append(tool_outputs.begin(), tool_outputs.end()); + } + } +- if (used_types.Get(SourceFile::SOURCE_MM)) { ++ if (used_types.Get(SOURCE_MM)) { + const CTool* tool = + source_set->toolchain()->GetToolAsC(CTool::kCToolObjCxx); + if (tool && tool->precompiled_header_type() == CTool::PCH_MSVC) { +@@ -118,7 +119,7 @@ void NinjaCBinaryTargetWriter::Run() { + // Figure out what source types are needed. + SourceFileTypeSet used_types; + for (const auto& source : target_->sources()) +- used_types.Set(source.type()); ++ used_types.Set(GetSourceFileType(source)); + + WriteCompilerVars(used_types); + +@@ -234,34 +235,31 @@ void NinjaCBinaryTargetWriter::WriteCompilerVars( + target_->config_values().has_precompiled_headers(); + + EscapeOptions opts = GetFlagOptions(); +- if (used_types.Get(SourceFile::SOURCE_S) || +- used_types.Get(SourceFile::SOURCE_ASM)) { ++ if (used_types.Get(SOURCE_S) || used_types.Get(SOURCE_ASM)) { + WriteOneFlag(target_, &CSubstitutionAsmFlags, false, Tool::kToolNone, + &ConfigValues::asmflags, opts, path_output_, out_); + } +- if (used_types.Get(SourceFile::SOURCE_C) || +- used_types.Get(SourceFile::SOURCE_CPP) || +- used_types.Get(SourceFile::SOURCE_M) || +- used_types.Get(SourceFile::SOURCE_MM)) { ++ if (used_types.Get(SOURCE_C) || used_types.Get(SOURCE_CPP) || ++ used_types.Get(SOURCE_M) || used_types.Get(SOURCE_MM)) { + WriteOneFlag(target_, &CSubstitutionCFlags, false, Tool::kToolNone, + &ConfigValues::cflags, opts, path_output_, out_); + } +- if (used_types.Get(SourceFile::SOURCE_C)) { ++ if (used_types.Get(SOURCE_C)) { + WriteOneFlag(target_, &CSubstitutionCFlagsC, has_precompiled_headers, + CTool::kCToolCc, &ConfigValues::cflags_c, opts, path_output_, + out_); + } +- if (used_types.Get(SourceFile::SOURCE_CPP)) { ++ if (used_types.Get(SOURCE_CPP)) { + WriteOneFlag(target_, &CSubstitutionCFlagsCc, has_precompiled_headers, + CTool::kCToolCxx, &ConfigValues::cflags_cc, opts, path_output_, + out_); + } +- if (used_types.Get(SourceFile::SOURCE_M)) { ++ if (used_types.Get(SOURCE_M)) { + WriteOneFlag(target_, &CSubstitutionCFlagsObjC, has_precompiled_headers, + CTool::kCToolObjC, &ConfigValues::cflags_objc, opts, + path_output_, out_); + } +- if (used_types.Get(SourceFile::SOURCE_MM)) { ++ if (used_types.Get(SOURCE_MM)) { + WriteOneFlag(target_, &CSubstitutionCFlagsObjCc, has_precompiled_headers, + CTool::kCToolObjCxx, &ConfigValues::cflags_objcc, opts, + path_output_, out_); +@@ -321,14 +319,14 @@ void NinjaCBinaryTargetWriter::WritePCHCommands( + + const CTool* tool_c = target_->toolchain()->GetToolAsC(CTool::kCToolCc); + if (tool_c && tool_c->precompiled_header_type() != CTool::PCH_NONE && +- used_types.Get(SourceFile::SOURCE_C)) { ++ used_types.Get(SOURCE_C)) { + WritePCHCommand(&CSubstitutionCFlagsC, CTool::kCToolCc, + tool_c->precompiled_header_type(), input_dep, + order_only_deps, object_files, other_files); + } + const CTool* tool_cxx = target_->toolchain()->GetToolAsC(CTool::kCToolCxx); + if (tool_cxx && tool_cxx->precompiled_header_type() != CTool::PCH_NONE && +- used_types.Get(SourceFile::SOURCE_CPP)) { ++ used_types.Get(SOURCE_CPP)) { + WritePCHCommand(&CSubstitutionCFlagsCc, CTool::kCToolCxx, + tool_cxx->precompiled_header_type(), input_dep, + order_only_deps, object_files, other_files); +@@ -336,7 +334,7 @@ void NinjaCBinaryTargetWriter::WritePCHCommands( + + const CTool* tool_objc = target_->toolchain()->GetToolAsC(CTool::kCToolObjC); + if (tool_objc && tool_objc->precompiled_header_type() == CTool::PCH_GCC && +- used_types.Get(SourceFile::SOURCE_M)) { ++ used_types.Get(SOURCE_M)) { + WritePCHCommand(&CSubstitutionCFlagsObjC, CTool::kCToolObjC, + tool_objc->precompiled_header_type(), input_dep, + order_only_deps, object_files, other_files); +@@ -345,7 +343,7 @@ void NinjaCBinaryTargetWriter::WritePCHCommands( + const CTool* tool_objcxx = + target_->toolchain()->GetToolAsC(CTool::kCToolObjCxx); + if (tool_objcxx && tool_objcxx->precompiled_header_type() == CTool::PCH_GCC && +- used_types.Get(SourceFile::SOURCE_MM)) { ++ used_types.Get(SOURCE_MM)) { + WritePCHCommand(&CSubstitutionCFlagsObjCc, CTool::kCToolObjCxx, + tool_objcxx->precompiled_header_type(), input_dep, + order_only_deps, object_files, other_files); +@@ -478,7 +476,7 @@ void NinjaCBinaryTargetWriter::WriteSources( + deps.resize(0); + const char* tool_name = Tool::kToolNone; + if (!target_->GetOutputFilesForSource(source, &tool_name, &tool_outputs)) { +- if (source.type() == SourceFile::SOURCE_DEF) ++ if (GetSourceFileType(source) == SOURCE_DEF) + other_files->push_back(source); + continue; // No output for this source. + } +@@ -599,7 +597,7 @@ void NinjaCBinaryTargetWriter::WriteLinkerStuff( + const SourceFile* optional_def_file = nullptr; + if (!other_files.empty()) { + for (const SourceFile& src_file : other_files) { +- if (src_file.type() == SourceFile::SOURCE_DEF) { ++ if (GetSourceFileType(src_file) == SOURCE_DEF) { + optional_def_file = &src_file; + implicit_deps.push_back( + OutputFile(settings_->build_settings(), src_file)); +--- tools/gn/tools/gn/source_dir.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/source_dir.cc +@@ -98,10 +98,10 @@ SourceFile SourceDir::ResolveRelativeFile( + return ret; + + const std::string& input_string = p.string_value(); +- if (!ValidateResolveInput(true, p, input_string, err)) ++ if (!ValidateResolveInput(true, p, input_string, err)) { + return ret; +- +- ret.SetValue(ResolveRelative(input_string, value_, true, source_root)); ++ } ++ ret.value_ = ResolveRelative(input_string, value_, true, source_root); + return ret; + } + +--- tools/gn/tools/gn/source_file_type.cc.orig 2019-06-01 16:50:13 UTC ++++ tools/gn/tools/gn/source_file_type.cc +@@ -0,0 +1,37 @@ ++// Copyright 2014 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "tools/gn/source_file_type.h" ++ ++#include "tools/gn/filesystem_utils.h" ++#include "tools/gn/source_file.h" ++ ++SourceFileType GetSourceFileType(const SourceFile& file) { ++ base::StringPiece extension = FindExtension(&file.value()); ++ if (extension == "cc" || extension == "cpp" || extension == "cxx") ++ return SOURCE_CPP; ++ if (extension == "h" || extension == "hpp" || extension == "hxx" || ++ extension == "hh") ++ return SOURCE_H; ++ if (extension == "c") ++ return SOURCE_C; ++ if (extension == "m") ++ return SOURCE_M; ++ if (extension == "mm") ++ return SOURCE_MM; ++ if (extension == "rc") ++ return SOURCE_RC; ++ if (extension == "S" || extension == "s" || extension == "asm") ++ return SOURCE_S; ++ if (extension == "o" || extension == "obj") ++ return SOURCE_O; ++ if (extension == "def") ++ return SOURCE_DEF; ++ if (extension == "rs") ++ return SOURCE_RS; ++ if (extension == "go") ++ return SOURCE_GO; ++ ++ return SOURCE_UNKNOWN; ++} +--- tools/gn/tools/gn/source_file_type.h.orig 2019-06-01 16:50:13 UTC ++++ tools/gn/tools/gn/source_file_type.h +@@ -0,0 +1,34 @@ ++// Copyright 2014 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#ifndef TOOLS_GN_SOURCE_FILE_TYPE_H_ ++#define TOOLS_GN_SOURCE_FILE_TYPE_H_ ++ ++class SourceFile; ++ ++// This should be sequential integers starting from 0 so they can be used as ++// array indices. ++enum SourceFileType { ++ SOURCE_UNKNOWN = 0, ++ SOURCE_ASM, ++ SOURCE_C, ++ SOURCE_CPP, ++ SOURCE_H, ++ SOURCE_M, ++ SOURCE_MM, ++ SOURCE_S, ++ SOURCE_RC, ++ SOURCE_O, // Object files can be inputs, too. Also counts .obj. ++ SOURCE_DEF, ++ ++ SOURCE_RS, ++ SOURCE_GO, ++ ++ // Must be last. ++ SOURCE_NUMTYPES, ++}; ++ ++SourceFileType GetSourceFileType(const SourceFile& file); ++ ++#endif // TOOLS_GN_SOURCE_FILE_TYPE_H_ +--- tools/gn/tools/gn/source_file.cc.orig 2019-06-01 16:50:13 UTC ++++ tools/gn/tools/gn/source_file.cc +@@ -21,45 +21,15 @@ void AssertValueSourceFileString(const std::string& s) + DCHECK(!EndsWithSlash(s)) << s; + } + +-SourceFile::Type GetSourceFileType(const std::string& file) { +- base::StringPiece extension = FindExtension(&file); +- if (extension == "cc" || extension == "cpp" || extension == "cxx") +- return SourceFile::SOURCE_CPP; +- if (extension == "h" || extension == "hpp" || extension == "hxx" || +- extension == "hh" || extension == "inc") +- return SourceFile::SOURCE_H; +- if (extension == "c") +- return SourceFile::SOURCE_C; +- if (extension == "m") +- return SourceFile::SOURCE_M; +- if (extension == "mm") +- return SourceFile::SOURCE_MM; +- if (extension == "rc") +- return SourceFile::SOURCE_RC; +- if (extension == "S" || extension == "s" || extension == "asm") +- return SourceFile::SOURCE_S; +- if (extension == "o" || extension == "obj") +- return SourceFile::SOURCE_O; +- if (extension == "def") +- return SourceFile::SOURCE_DEF; +- if (extension == "rs") +- return SourceFile::SOURCE_RS; +- if (extension == "go") +- return SourceFile::SOURCE_GO; +- +- return SourceFile::SOURCE_UNKNOWN; +-} +- + } // namespace + +-SourceFile::SourceFile() : type_(SOURCE_UNKNOWN) {} ++SourceFile::SourceFile() = default; + + SourceFile::SourceFile(const base::StringPiece& p) + : value_(p.data(), p.size()) { + DCHECK(!value_.empty()); + AssertValueSourceFileString(value_); + NormalizePath(&value_); +- type_ = GetSourceFileType(value_); + } + + SourceFile::SourceFile(SwapIn, std::string* value) { +@@ -67,7 +37,6 @@ SourceFile::SourceFile(SwapIn, std::string* value) { + DCHECK(!value_.empty()); + AssertValueSourceFileString(value_); + NormalizePath(&value_); +- type_ = GetSourceFileType(value_); + } + + SourceFile::~SourceFile() = default; +@@ -92,9 +61,4 @@ SourceDir SourceFile::GetDir() const { + + base::FilePath SourceFile::Resolve(const base::FilePath& source_root) const { + return ResolvePath(value_, true, source_root); +-} +- +-void SourceFile::SetValue(const std::string& value) { +- value_ = value; +- type_ = GetSourceFileType(value_); + } +--- tools/gn/tools/gn/source_file.h.orig 2019-06-01 16:50:13 UTC ++++ tools/gn/tools/gn/source_file.h +@@ -74,15 +74,10 @@ class SourceFile { + return value_ < other.value_; + } + +- void swap(SourceFile& other) { +- value_.swap(other.value_); +- std::swap(type_, other.type_); +- } ++ void swap(SourceFile& other) { value_.swap(other.value_); } + + private: + friend class SourceDir; +- +- void SetValue(const std::string& value); + + std::string value_; + +--- tools/gn/tools/gn/target_generator.h.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/target_generator.h +@@ -47,7 +47,7 @@ class TargetGenerator { + + const BuildSettings* GetBuildSettings() const; + +- virtual bool FillSources(); ++ bool FillSources(); + bool FillPublic(); + bool FillConfigs(); + bool FillOutputs(bool allow_substitutions); +--- tools/gn/tools/gn/target.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/target.cc +@@ -16,6 +16,7 @@ + #include "tools/gn/filesystem_utils.h" + #include "tools/gn/functions.h" + #include "tools/gn/scheduler.h" ++#include "tools/gn/source_file_type.h" + #include "tools/gn/substitution_writer.h" + #include "tools/gn/tool.h" + #include "tools/gn/toolchain.h" +@@ -486,10 +487,10 @@ bool Target::GetOutputFilesForSource(const SourceFile& + outputs->clear(); + *computed_tool_type = Tool::kToolNone; + +- SourceFile::Type file_type = source.type(); +- if (file_type == SourceFile::SOURCE_UNKNOWN) ++ SourceFileType file_type = GetSourceFileType(source); ++ if (file_type == SOURCE_UNKNOWN) + return false; +- if (file_type == SourceFile::SOURCE_O) { ++ if (file_type == SOURCE_O) { + // Object files just get passed to the output and not compiled. + outputs->push_back(OutputFile(settings()->build_settings(), source)); + return true; +--- tools/gn/tools/gn/tool.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/tool.cc +@@ -261,27 +261,27 @@ std::unique_ptr Tool::CreateTool(const std::stri + } + + // static +-const char* Tool::GetToolTypeForSourceType(SourceFile::Type type) { ++const char* Tool::GetToolTypeForSourceType(SourceFileType type) { + switch (type) { +- case SourceFile::SOURCE_C: ++ case SOURCE_C: + return CTool::kCToolCc; +- case SourceFile::SOURCE_CPP: ++ case SOURCE_CPP: + return CTool::kCToolCxx; +- case SourceFile::SOURCE_M: ++ case SOURCE_M: + return CTool::kCToolObjC; +- case SourceFile::SOURCE_MM: ++ case SOURCE_MM: + return CTool::kCToolObjCxx; +- case SourceFile::SOURCE_ASM: +- case SourceFile::SOURCE_S: ++ case SOURCE_ASM: ++ case SOURCE_S: + return CTool::kCToolAsm; +- case SourceFile::SOURCE_RC: ++ case SOURCE_RC: + return CTool::kCToolRc; +- case SourceFile::SOURCE_UNKNOWN: +- case SourceFile::SOURCE_H: +- case SourceFile::SOURCE_O: +- case SourceFile::SOURCE_DEF: +- case SourceFile::SOURCE_GO: +- case SourceFile::SOURCE_RS: ++ case SOURCE_UNKNOWN: ++ case SOURCE_H: ++ case SOURCE_O: ++ case SOURCE_DEF: ++ case SOURCE_GO: ++ case SOURCE_RS: + return kToolNone; + default: + NOTREACHED(); +--- tools/gn/tools/gn/tool.h.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/tool.h +@@ -12,7 +12,7 @@ + #include "tools/gn/label.h" + #include "tools/gn/label_ptr.h" + #include "tools/gn/scope.h" +-#include "tools/gn/source_file.h" ++#include "tools/gn/source_file_type.h" + #include "tools/gn/substitution_list.h" + #include "tools/gn/substitution_pattern.h" + +@@ -171,7 +171,7 @@ class Tool { + Toolchain* toolchain, + Err* err); + +- static const char* GetToolTypeForSourceType(SourceFile::Type type); ++ static const char* GetToolTypeForSourceType(SourceFileType type); + static const char* GetToolTypeForTargetFinalOutput(const Target* target); + + protected: +--- tools/gn/tools/gn/toolchain.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/toolchain.cc +@@ -88,16 +88,16 @@ void Toolchain::ToolchainSetupComplete() { + setup_complete_ = true; + } + +-const Tool* Toolchain::GetToolForSourceType(SourceFile::Type type) const { ++const Tool* Toolchain::GetToolForSourceType(SourceFileType type) const { + return GetTool(Tool::GetToolTypeForSourceType(type)); + } + +-const CTool* Toolchain::GetToolForSourceTypeAsC(SourceFile::Type type) const { ++const CTool* Toolchain::GetToolForSourceTypeAsC(SourceFileType type) const { + return GetToolAsC(Tool::GetToolTypeForSourceType(type)); + } + + const GeneralTool* Toolchain::GetToolForSourceTypeAsGeneral( +- SourceFile::Type type) const { ++ SourceFileType type) const { + return GetToolAsGeneral(Tool::GetToolTypeForSourceType(type)); + } + +--- tools/gn/tools/gn/toolchain.h.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/toolchain.h +@@ -12,6 +12,7 @@ + #include "tools/gn/item.h" + #include "tools/gn/label_ptr.h" + #include "tools/gn/scope.h" ++#include "tools/gn/source_file_type.h" + #include "tools/gn/substitution_type.h" + #include "tools/gn/tool.h" + #include "tools/gn/value.h" +@@ -87,9 +88,9 @@ class Toolchain : public Item { + } + + // Returns the tool for compiling the given source file type. +- const Tool* GetToolForSourceType(SourceFile::Type type) const; +- const CTool* GetToolForSourceTypeAsC(SourceFile::Type type) const; +- const GeneralTool* GetToolForSourceTypeAsGeneral(SourceFile::Type type) const; ++ const Tool* GetToolForSourceType(SourceFileType type) const; ++ const CTool* GetToolForSourceTypeAsC(SourceFileType type) const; ++ const GeneralTool* GetToolForSourceTypeAsGeneral(SourceFileType type) const; + + // Returns the tool that produces the final output for the given target type. + // This isn't necessarily the tool you would expect. For copy target, this +--- tools/gn/tools/gn/visual_studio_writer.cc.orig 2019-05-21 22:00:02 UTC ++++ tools/gn/tools/gn/visual_studio_writer.cc +@@ -24,6 +24,7 @@ + #include "tools/gn/label_pattern.h" + #include "tools/gn/parse_tree.h" + #include "tools/gn/path_output.h" ++#include "tools/gn/source_file_type.h" + #include "tools/gn/standard_out.h" + #include "tools/gn/target.h" + #include "tools/gn/variables.h" Property changes on: head/www/chromium/files/patch-fix-gn-74 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property