summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | [PR #3337] add testcase for tool lookupMats Wichmann2019-04-242-23/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a unit test to show find_program_path does not alter env['ENV']['PATH']. A little cleanup in Tool/__init__.py: don't use mutable object as default value in function signature (checkers complain about this); getter/setter usage seemed unnecessary - kept one of the two but use modern syntax (checkers complain about use-before set, which is fixed by the change) Signed-off-by: Mats Wichmann <mats@linux.com>
| * | | Merge branch 'master' into tool-addWilliam Deegan2019-04-2340-319/+451
| |\ \ \
| | * \ \ Merge pull request #3352 from mwichmann/java-versWilliam Deegan2019-04-236-65/+169
| | |\ \ \ | | | | | | | | | | | | Fix problems with jdk detection
| | | * \ \ Merge pull request #1 from bdbaddog/java-versMats Wichmann2019-04-222-95/+136
| | | |\ \ \ | | | | | | | | | | | | | | changes to unit test to avoid hitting the filesystem
| | | | * | | changes to unit test to avoid hitting the filesystemWilliam Deegan2019-04-222-95/+136
| | | | | | |
| | | * | | | Merge branch 'master' into java-versWilliam Deegan2019-04-2228-249/+198
| | | |\ \ \ \ | | | | |/ / / | | | |/| | |
| | | * | | | Move the jdk-version-glob test to unit testsMats Wichmann2019-04-171-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
| | | * | | | Fix problems with jdk detectionMats Wichmann2019-04-145-42/+55
| | | | |_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The java tool common routine finds a jdk by doing a filesystem glob. This had a problem on windows in the case a specific version is requested, because the format of name of the jdk directory has changed with JDK 9 - there is a dash between jdk and the version string. The glob which does not attempt to match a version was general enough not to trip on this, but with a version to match it would never match jdk-9 or higher. The test harness then asks the found javac what version it is, and the parsing of that did not work as expected once version numbers became double-digit, as the regex was for a single digit followed by a dot. The outcome is for 11.0.2 we get back '11' instead of '11.0'. Change the regex to match any number of digits followed by dot. The Repository/RMIC.py change is to align with an earlier change to Java/RMIC.py, but the may not be needed after the change to regex just described. Clean up some of the Java tool routines for consistency (there was no functional change outside of JavaCommon.py) Docstrings added or updated in several places. Signed-off-by: Mats Wichmann <mats@linux.com>
| | * | | | Fix default value logic for TEMPFILEARGJOINWilliam Deegan2019-04-221-1/+1
| | | | | |
| | * | | | Merge remote-tracking branch 'origin/fix_3350_mslink_tempfile_join_char' ↵William Deegan2019-04-227-10/+75
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | into fix_3350_mslink_tempfile_join_char
| | | * | | | Updated mslink, mslib, msvc, platform docs, and added unit testWilliam Deegan2019-04-227-6/+65
| | | | | | |
| | | * | | | PEP 8 fileWilliam Deegan2019-04-221-4/+10
| | | | | | |
| | * | | | | Merge branch 'master' of github.com:SCons/scons into ↵William Deegan2019-04-2225-232/+181
| | |\ \ \ \ \ | | | |/ / / / | | |/| | / / | | | | |/ / | | | |/| | fix_3350_mslink_tempfile_join_char
| | | * | | Fixup some code triggering pylint errors.Mats Wichmann2019-04-2125-232/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assorted fixups: exception types, redefined functions, globals, etc. Some old code removed to resolve issues (hashlib is always present on modern Pythons; no longer need the code for 2.5-and-earlier optparse). cmp is not a builtin function in Py3, drop one (unused) use; replace one. Fix another instance of renaming to SConsEnvironmentError. TODO flagged some instances of doing a raise without argument but not inside a try block - this is not considered legal, since raise with no argument is for re-raising an exception, but I don't know exactly how to resolve this in these cases. Also flagged an instance of raising an int instead of an exception class. We can either leave these as markers or update the PR. Signed-off-by: Mats Wichmann <mats@linux.com>
| | * | | | Issue #3350 - Add TEMPFILEARGJOINBYTE as a variable to be used to join each ↵William Deegan2019-04-204-1/+15
| | |/ / / | | | | | | | | | | | | | | | item placed into a TEMPFILE. Previously hardcoded as a bytearray space, now it is overridden by msvc and mslink tools
| | * | | Issue #3350 - Refactor EnvironmentError to SConsEnvironmentError to avoid ↵William Deegan2019-04-187-17/+17
| | |/ / | | | | | | | | | | | | overriding python's native EnvironmentError
| * | | [PR #3337] centralize definition of candidatesMats Wichmann2019-04-162-29/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A list of possible executable names are provided in several places in yacc and lex tools, make it a little cleaner by defining once, at the top. Signed-off-by: Mats Wichmann <mats@linux.com>
| * | | [PR #3337] clean up lex and yacc toolsMats Wichmann2019-04-132-18/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove now unneeded code to save/restore the path, since the routine now does not modify the path. Signed-off-by: Mats Wichmann <mats@linux.com>
| * | | [#3336] do not add not-found tool pathsMats Wichmann2019-04-132-12/+16
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When tool modules initialize, they check paths to decide if the underlying tool is actually present. The current checker adds any "default paths" the caller may have supplied (locations like mingw, cygwin, chocolatey install locations, etc.); if there is match from this list, any previous default paths are also kept. To avoid keeping these non-matching paths, restore the original PATH; the caller is responsible for adding to PATH if necessary. Docstring now says so. Note lex and yacc tool modules seem to expect the path-modifying behavior that's being gotten rid of - so they preseve the path first and restore it after. The change here won't break those, but makes the extra behavior unneeded - could remove it. Signed-off-by: Mats Wichmann <mats@linux.com>
* | | Fix sider complainWilliam Deegan2019-04-261-1/+1
| | |
* | | Move target_peers to slots from attributesWilliam Deegan2019-04-022-1/+9
| | |
* | | Merge branch 'master' of github.com:SCons/scons into ↵William Deegan2019-04-027-33/+19
|\ \ \ | |/ / | | | | | | fix_mongo_bug_33111_multiple_targets_via_emitter_spurious_rebuilds
| * | [PY 3.8] fix some sider complaints in #3331Mats Wichmann2019-03-301-1/+0
| | | | | | | | | | | | | | | | | | One was "real": had failed to indent a with: block Signed-off-by: Mats Wichmann <mats@linux.com>
| * | [WIP] [PY 3.8] fix more warningsMats Wichmann2019-03-307-33/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several locations with simple usage of deprecated "imp" module changed to use "importlib". These match with work in #3159, but this is not a complete implementation of #3159. More regex patterns are changed to be raw strings. Some strings which did not seem appropriate to change to raw strings (e.g. contain embedded tabs, which Python should honor) had backslashes escaped to avoid accidental Python interpretation. Example: '\t<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.targets" />\n' Python 3.8 was Warning \M was an unknown escape. More open().write(), open().read() style usage changed to use context managers so the file is closed. WIP part: even with Python 3.7, the tests which call sconsign.py fail; oddly they do not fail without the patch to compat.py. sconsign.py does an import using imp module (which is what generates the errors) so needs to be updated anyway. It does not quite fit the "simple usage" pattern - can't do a simple relative import since sconsign is normally located elsewhere in the tree than the main scons code body. With this version of the patch, 700 tests now pass with 3.8, and Warning messages reduced to 2800 (current master has 200 pass, 9000 warns) Signed-off-by: Mats Wichmann <mats@linux.com>
* | | Fix issue #2811 spurious rebuilds due to incorrect waiting_parents on nodes ↵William Deegan2019-04-021-0/+19
|/ / | | | | | | when builder has more than one target and source file generated
* | Fix Issue #3333 - Find vswhere under 32 bit windows installsWilliam Deegan2019-03-261-7/+15
| |
* | Add support for MSSDK V10.0A fixes GH Issue #3329William Deegan2019-03-181-0/+10
| |
* | Merge pull request #3328 from bdbaddog/gh_issue_2799_mingw_respect_comstrWilliam Deegan2019-03-121-31/+33
|\ \ | | | | | | Fix issue #2799 Get mingw tool to respect SHCCCOMSTR, SHLINKCOMSTR and LDMODULECOMSTR
| * | PEP8William Deegan2019-03-111-29/+30
| | |
| * | Fix issue #2799 - Get mingw tool to respect SHCCCOMSTR, SHLINKCOMSTR and ↵William Deegan2019-03-111-2/+3
| | | | | | | | | | | | LDMODULECOMSTR
* | | Merge pull request #3327 from mwichmann/open-and-regex-cleanupsWilliam Deegan2019-03-1015-52/+69
|\ \ \ | |/ / |/| | Clean up some file opens, regex strings
| * | Clean up some file opens, regex stringsMats Wichmann2019-03-0715-52/+69
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most recent Python (3.8 alpha) spews warnings aplenty about two subjects: unclosed files and strings which look like they have embedded escapes that Python does not recognize. The latter are usually regexes, and it provides a reminder that regular expressions should normally be specified as raw strings, so Python does not attempt to interpret them. Irritating is that even docstrings are flagged, it's not obvious what the right answer is for a docstring which contains, say, a Windows-style path with backslashes. This converts a bunch of opens that are not closed into context manager usage and regex patterns into raw strings. This eliminate about 4000 warnings spewed by Py3.8 (9200 remain). Signed-off-by: Mats Wichmann <mats@linux.com>
* | Add /nologo flag to RCFLAGSMaciej Kumorek2019-03-071-1/+1
|/
* Merge pull request #3317 from ↵William Deegan2019-03-041-7/+51
|\ | | | | | | | | bdbaddog/fix_win_md5_decider_malfunction_on_fresh_build MD5-Timestamp was causing build failures on windows only. (Mesa Project affected)
| * Merge branch 'fix_win_md5_decider_malfunction_on_fresh_build' of ↵William Deegan2019-03-038-28/+147
| |\ | | | | | | | | | github.com:bdbaddog/scons into fix_win_md5_decider_malfunction_on_fresh_build
| | * Added logic to shortcut comparing prev_ni if there is no dependency map from ↵William Deegan2019-03-031-4/+24
| | | | | | | | | | | | previous build. This should speed up md5-timestamp builds for clean builds. Also added debug logic to dump and check aagainst previous implementation at top of FS.PY MD5_TIMESTAMP_DEBUG flag. currently set to False
| | * On windows first try with native file paths with \\ then swap path to ↵William Deegan2019-03-031-7/+26
| | | | | | | | | | | | normalized path string with / separators. On a fresh windows build the node string will have windows dirsep and not normalizd. This yielded broken builds for the Meta project'
| * | Forgot to add current file csig when shortcutting calling changed_content(). ↵William Deegan2019-03-021-0/+5
| | | | | | | | | | | | Directly calling get_csig() when there is no previous build history
| * | Added logic to shortcut comparing prev_ni if there is no dependency map from ↵William Deegan2019-03-011-4/+24
| | | | | | | | | | | | previous build. This should speed up md5-timestamp builds for clean builds. Also added debug logic to dump and check aagainst previous implementation at top of FS.PY MD5_TIMESTAMP_DEBUG flag. currently set to False
| * | On windows first try with native file paths with \\ then swap path to ↵William Deegan2019-02-271-7/+26
| | | | | | | | | | | | normalized path string with / separators. On a fresh windows build the node string will have windows dirsep and not normalizd. This yielded broken builds for the Meta project'
* | | [PYPY] fix way exit status is retrieved in mainMats Wichmann2019-03-031-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When scons exits, it wants to take the opportunity to print any diagnostics and statistics that may have been requested, so the main routine traps the various ways it can quit. If code somewhere calls sys.exit(), that generates a SystemExit exception. The handling of that has not been quite correct - it simply takes the exception instance, saves it, and later quits with sys.exit(saved). This seemingly works fine for all other tested versions of Python, but has interesting side effects with PyPy3. Per the Python documentation: If the value is an integer, it specifies the system exit status (passed to C’s exit() function); if it is None, the exit status is zero; if it has another type (such as a string), the object’s value is printed and the exit status is one. And in fact, PyPy3 does this: if the original call to sys.exit took a value of 2, then the SystemExit exception triggers with a class instance which does have an exit code of 2, which turns up if you take the string repr of the instance, but when passed to the final sys.exit, as it's not an integer it *prints* the 2, and returns with an exit code of 1, just as in the documentation snip. Not really sure if PyPy3 is wrong here, or the other Pythons are letting something slide, but it's an easy fix: save off the code stored in the exception instance for later use as the exit code, instead of using the instance itself for that. Signed-off-by: Mats Wichmann <mats@linux.com>
* | copy logic from lex to find win_bison if installed via chocolateyWilliam Deegan2019-03-031-1/+29
| |
* | Merge pull request #3290 from dmoody256/make_lex_tool_cross_platformWilliam Deegan2019-03-034-3/+58
|\ \ | | | | | | Add windows default paths to lex tool
| * | only use no-unistd option with MSVC environmentDaniel2019-03-012-4/+10
| | |
| * | add win_flex as option for windows, add choco default path, and add flag for ↵Daniel2019-02-203-10/+29
| | | | | | | | | | | | nounistd on windows. also more testing
| * | condensed and organized codeDaniel2019-02-171-20/+12
| | |
| * | update lex tool to find paths on windowsDaniel2019-02-161-3/+41
| | |
* | | Merge pull request #3313 from ↵William Deegan2019-02-283-24/+60
|\ \ \ | |_|/ |/| | | | | | | | bdbaddog/fix_gh_3303_force_config_alters_env_decider Fix issue #3303 - --config=force overwriting environment passed to Configure()
| * | Update SConf tests to add scan arg to mocked out Node children() method ↵William Deegan2019-02-281-1/+1
| | | | | | | | | | | | since this is now used by SConf's logic
| * | Fix Issue #3303 --config=force overwritting passed in Environment's Decider ↵William Deegan2019-02-272-23/+59
| | | | | | | | | | | | and not cleaning it up when configure context is complete