diff options
author | weili <weili@chromium.org> | 2016-04-28 15:26:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-28 15:26:45 -0700 |
commit | 9a1b665f8a6762927b7fa4fb9c812f00e8d3135e (patch) | |
tree | 883b17bc1bccaed288d8da5ad01630b05122cae9 /build_gyp/gyp_pdfium | |
parent | 33a747db5c9ce18bdfaaaaea17b03ef26d14ff54 (diff) | |
download | pdfium-9a1b665f8a6762927b7fa4fb9c812f00e8d3135e.tar.xz |
Reland of Use visual studio toolchain from depot_tools for PDFium compilation (patchset #1 id:1 of https://codereview.chromium.org/1922373003/ )
Reason for revert:
I fixed Clang build config, and updated drm binary. Should work this time.
Original issue's description:
> Revert of Use visual studio toolchain from depot_tools for PDFium compilation (patchset #3 id:40001 of https://codereview.chromium.org/1897523002/ )
>
> Reason for revert:
> Clang build is broken. drm build has some problem. Will revert this change for now.
>
> Original issue's description:
> > Use visual studio toolchain from depot_tools for PDFium compilation
> >
> > Change to use visual studio toolchain from depot_tools by default.
> > Setting DEPOT_TOOLS_WIN_TOOLCHAIN=0 allows compilation using system
> > toolchain as before.
> >
> > Using toolchain from depot_tools unifies the compilation
> > environment, and brings the benefits of automated update, bug fixes
> > etc.
> >
> > Committed: https://pdfium.googlesource.com/pdfium/+/590f2d9e057a0d5b17a9706affd3c6115265021b
>
> TBR=brucedawson@chromium.org,thestig@chromium.org,tsepez@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
>
> Committed: https://pdfium.googlesource.com/pdfium/+/df96690d4e3799536b981e3673d64018fa5fd037
TBR=brucedawson@chromium.org,thestig@chromium.org,tsepez@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/1927373002
Diffstat (limited to 'build_gyp/gyp_pdfium')
-rwxr-xr-x | build_gyp/gyp_pdfium | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/build_gyp/gyp_pdfium b/build_gyp/gyp_pdfium index c79593b990..23b1c719c2 100755 --- a/build_gyp/gyp_pdfium +++ b/build_gyp/gyp_pdfium @@ -13,13 +13,23 @@ import sys 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) @@ -36,7 +46,7 @@ def main(): 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)) @@ -46,6 +56,9 @@ def main(): 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() |