summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Moody <dmoody256@gmail.com>2018-05-25 20:17:37 (GMT)
committerDaniel Moody <dmoody256@gmail.com>2018-05-25 20:17:37 (GMT)
commit091de85561b5f4228f4f91c34b027823a54a6942 (patch)
treeaf233ed67c04a72c516f88bbb47da0e8fc68d2cc /src
parentb20299cf0bbc8b7073838c225d68909d6f021fab (diff)
parentcf74ad1fc7b745f8dfcf5886aa5e0326d104caa0 (diff)
downloadSCons-091de85561b5f4228f4f91c34b027823a54a6942.zip
SCons-091de85561b5f4228f4f91c34b027823a54a6942.tar.gz
SCons-091de85561b5f4228f4f91c34b027823a54a6942.tar.bz2
Merge remote-tracking branch 'bd/appveyor_issues' into pr-3052-Add-method-for-individual-tools-to-search-for-windows
Diffstat (limited to 'src')
-rw-r--r--src/CHANGES.txt7
-rw-r--r--src/engine/SCons/Tool/clang.py3
-rw-r--r--src/engine/SCons/Tool/mingw.py21
3 files changed, 29 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 8cd8975..c108378 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -44,6 +44,13 @@ RELEASE 3.1.0.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE
- Re-Enable parallel SCons (-j) when running via Pypy
- Move SCons test framework files to testing/framework and remove all references to QMtest.
QMTest has not been used by SCons for some time now.
+ - Updated logic for mingw and clang on win32 to search default tool install paths if not
+ found in normal SCons PATH. If the user specifies PATH or tool specific paths they
+ will be used and the default paths below will be ignored.
+ - Default path for clang/clangxx : C:\Program Files\LLVM\bin
+ - Default path for mingw : C:\MinGW\bin and/or C:\mingw-w64\*\mingw64\bin
+ - Key program to locate mingw : mingw32-make (as the gcc with mingw prefix has no fixed name)
+
From Andrew Featherstone
- Removed unused --warn options from the man page and source code.
diff --git a/src/engine/SCons/Tool/clang.py b/src/engine/SCons/Tool/clang.py
index c51e753..cbb48cb 100644
--- a/src/engine/SCons/Tool/clang.py
+++ b/src/engine/SCons/Tool/clang.py
@@ -56,7 +56,8 @@ def generate(env):
if env['PLATFORM'] == 'win32':
# Ensure that we have a proper path for clang
- clang = SCons.Tool.find_program_path(env, compilers[0], default_paths=get_clang_install_dirs(env['PLATFORM']))
+ clang = SCons.Tool.find_program_path(env, compilers[0],
+ default_paths=get_clang_install_dirs(env['PLATFORM']))
if clang:
clang_bin_dir = os.path.dirname(clang)
env.AppendENVPath('PATH', clang_bin_dir)
diff --git a/src/engine/SCons/Tool/mingw.py b/src/engine/SCons/Tool/mingw.py
index f2e9442..738460d 100644
--- a/src/engine/SCons/Tool/mingw.py
+++ b/src/engine/SCons/Tool/mingw.py
@@ -35,6 +35,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import os
import os.path
+import glob
import SCons.Action
import SCons.Builder
@@ -115,10 +116,28 @@ res_builder = SCons.Builder.Builder(action=res_action, suffix='.o',
SCons.Tool.SourceFileScanner.add_scanner('.rc', SCons.Defaults.CScan)
# This is what we search for to find mingw:
-key_program = 'mingw32-gcc'
+# key_program = 'mingw32-gcc'
+key_program = 'mingw32-make'
+
+
+
+def find_version_specific_mingw_paths():
+ """
+ One example of default mingw install paths is:
+ C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev2\mingw64\bin
+
+ Use glob'ing to find such and add to mingw_paths
+ """
+ new_paths = glob.glob(r"C:\mingw-w64\*\mingw64\bin")
+
+ return new_paths
def generate(env):
+ global mingw_paths
+ # Check for reasoanble mingw default paths
+ mingw_paths +=find_version_specific_mingw_paths()
+
mingw = SCons.Tool.find_program_path(env, key_program, default_paths=mingw_paths)
if mingw:
mingw_bin_dir = os.path.dirname(mingw)