diff options
author | Michal Klocek <michal.klocek@qt.io> | 2019-02-21 13:10:32 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-25 10:25:25 +0100 |
commit | ae28eab4bbb2dcdc8ddd31b2b7a3a61ce442a8b1 (patch) | |
tree | ef49d0fed69a8053912cdd6b2c70f1175b14ec64 | |
parent | 3cc7e522c9cba9102621733d708e2a16313e3d36 (diff) |
Fix not working ar on windows
Make ar optional.
Change-Id: Ib457d45ff2855edea4babf39c30fc905a46684cc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rwxr-xr-x | gn/build/gen.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gn/build/gen.py b/gn/build/gen.py index 315bf025931..57f54ef5fa0 100755 --- a/gn/build/gen.py +++ b/gn/build/gen.py @@ -310,7 +310,7 @@ def WriteGenericNinja(path, static_libraries, executables, def WriteGNNinja(path, platform, host, options, linux_sysroot): # QTBUG-64759 - #iif platform.is_msvc(): + #if platform.is_msvc(): # cc = os.environ.get('CC', 'cl.exe') # cxx = os.environ.get('CXX', 'cl.exe') # ld = os.environ.get('LD', 'link.exe') @@ -336,6 +336,12 @@ def WriteGNNinja(path, platform, host, options, linux_sysroot): ld = options.ld ar = options.ar + if not ar: + if platform.is_msvc(): + ar = os.environ.get('AR', 'lib.exe') + else: + ar = os.environ.get('AR', 'ar') + cflags = [] cflags_cc = [] ldflags = [] |