6464 --gyp-generators=<gen> Set GYP_GENERATORS [default: ninja].
6565 --gyp-msvs-version=<v> Set GYP_MSVS_VERSION.
6666 --use-system-freetype Use system Freetype library on Linux (Issue #402)
67- --no-depot-tools-update Do not update depot_tools/ directory. When building
68- old unsupported versions of Chromium you want to
69- manually checkout an old version of depot tools
70- from the time of the release.
67+ --no-depot-tools-update Do not update depot_tools/ directory. When
68+ building old unsupported versions of Chromium
69+ you want to manually checkout an old version
70+ of depot tools from the time of the release.
7171
7272"""
7373
@@ -574,11 +574,15 @@ def fix_cmake_variables_for_MD_library(undo=False, try_undo=False):
574574 # This replacements must be unique for the undo operation
575575 # to be reliable.
576576
577- mt_find = r"/MT "
578- mt_replace = r"/MD /wd4275 "
577+ mt_find = r'CEF_RUNTIME_LIBRARY_FLAG "/MT"'
578+ mt_replace = r'CEF_RUNTIME_LIBRARY_FLAG "/MD"'
579579
580- mtd_find = r"/MTd "
581- mtd_replace = r"/MDd /wd4275 "
580+ wd4275_find = ('/wd4244 '
581+ '# Ignore "conversion possible loss of data" warning' )
582+ wd4275_replace = ('/wd4244 '
583+ '# Ignore "conversion possible loss of data" warning'
584+ '\r \n '
585+ ' /wd4275 # Ignore "non dll-interface class"' )
582586
583587 cmake_variables = os .path .join (Options .cef_binary , "cmake" ,
584588 "cef_variables.cmake" )
@@ -587,7 +591,7 @@ def fix_cmake_variables_for_MD_library(undo=False, try_undo=False):
587591
588592 if try_undo :
589593 matches1 = re .findall (re .escape (mt_replace ), contents )
590- matches2 = re .findall (re .escape (mtd_replace ), contents )
594+ matches2 = re .findall (re .escape (wd4275_replace ), contents )
591595 if len (matches1 ) or len (matches2 ):
592596 undo = True
593597 else :
@@ -596,15 +600,16 @@ def fix_cmake_variables_for_MD_library(undo=False, try_undo=False):
596600 if undo :
597601 (contents , count ) = re .subn (re .escape (mt_replace ), mt_find ,
598602 contents )
599- assert count == 2
600- (contents , count ) = re .subn (re .escape (mtd_replace ), mtd_find ,
603+ assert count == 1
604+ (contents , count ) = re .subn (re .escape (wd4275_replace ), wd4275_find ,
601605 contents )
602606 assert count == 1
603607 else :
604608 (contents , count ) = re .subn (re .escape (mt_find ), mt_replace ,
605609 contents )
606- assert count == 2
607- (contents , count ) = re .subn (re .escape (mtd_find ), mtd_replace ,
610+ print (re .escape (mt_find ))
611+ assert count == 1
612+ (contents , count ) = re .subn (re .escape (wd4275_find ), wd4275_replace ,
608613 contents )
609614 assert count == 1
610615
0 commit comments