Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: build_gyp/gyp_pdfium

Issue 1927373002: Reland of Use visual studio toolchain from depot_tools for PDFium compilation (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build_gyp/find_depot_tools.py ('k') | build_gyp/vs_toolchain.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_gyp/gyp_pdfium
diff --git a/build_gyp/gyp_pdfium b/build_gyp/gyp_pdfium
index c65337861ee1cdab73ada6b5f7ff19cfca13e09a..f47734b8889ddefb7d6152ea9c6b4b569e3e5eae 100755
--- a/build_gyp/gyp_pdfium
+++ b/build_gyp/gyp_pdfium
@@ -13,13 +13,23 @@
script_dir = os.path.dirname(os.path.realpath(__file__))
pdfium_root = os.path.abspath(os.path.join(script_dir, os.pardir))
+output_rel_dir = 'out'
sys.path.insert(0, os.path.join(pdfium_root, 'tools', 'gyp', 'pylib'))
import gyp
-
+# vs_toolchain needs to be after gyp path setting since it also uses gyp.
+import vs_toolchain
def run_gyp(args):
rc = gyp.main(args)
+
+ # Copy Windows toolchain DLLs.
+ vs_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
+ if vs_runtime_dll_dirs:
+ x64_runtime, x86_runtime = vs_runtime_dll_dirs
+ vs_toolchain.CopyVsRuntimeDlls(
+ os.path.join(pdfium_root, output_rel_dir), (x86_runtime, x64_runtime))
+
if rc != 0:
print 'Error running GYP'
sys.exit(rc)
@@ -32,7 +42,7 @@
args.append('-I')
args.append(os.path.join(pdfium_root, 'build_gyp', 'standalone.gypi'))
- args.extend(['-D', 'gyp_output_dir=out'])
+ args.extend(['-D', 'gyp_output_dir=' + output_rel_dir])
# Set the GYP DEPTH variable to the root of the PDFium project.
args.append('--depth=' + os.path.relpath(pdfium_root))
@@ -42,6 +52,9 @@
print 'GYP_GENERATORS is not set, defaulting to ninja'
os.environ['GYP_GENERATORS'] = 'ninja'
+ # Set up the environment variables.
+ vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
+
print 'Updating projects from gyp files...'
sys.stdout.flush()
« no previous file with comments | « build_gyp/find_depot_tools.py ('k') | build_gyp/vs_toolchain.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698