2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-27 04:15:00 +01:00
Commit Graph

3185 Commits

Author SHA1 Message Date
Dragoon
6154a8de60 Better support for cross compiling with Clang 2019-05-10 00:30:58 +02:00
ita1024
96015a3053 Merge branch 'msvcdeps-case' into 'master'
msvcdeps: correct case of include paths

See merge request ita1024/waf!2228
2019-05-09 05:05:39 +00:00
Michael Vincent
9caad8c3ba msvcdeps: use ant_glob() to get correct case of include paths
When using msvcdeps, header dependencies are not detected reliably for
generated source files. The root cause is a bug in versions of MSVC
prior to VS2019 16.0 in which it emits lower-case path prefixes when
resolving include paths relative to the containing file. Absolute paths
and paths relative to include directories passed in the MSVC command
line are, in contrast, case-correct.

Such a file-relative include directive with an incorrect lower-case
prefix derails waf's node hash signature handling and fails silently.

This change uses ant_glob() with the ignorecase keyword argument to
find the file on the filesystem with the correct case. The prior
case-correction code has been superseded and was removed.

See the following Visual Studio bug report for details on the issue:
https://developercommunity.visualstudio.com/content/problem/233871/showincludes-lowercases-some-path-segments.html
2019-05-08 17:22:00 -05:00
Michael Vincent
7c362340af msvcdeps: remove path_to_node()'s path list support
Make path_to_node() only accept a path as a string instead of also as a
list. That requires joining the list of path components in the relative
path case before calling path_to_node(). Also use path.pop(0) to remove
the first path component instead of copying the remainder of the path
using a slice operator.
2019-05-08 17:22:00 -05:00
Michael Vincent
8b5a2a2086 msvcdeps: refactor cache lock
Rework how msvcdeps' cached_nodes lock is used so acquiring the lock is
only necessary on a cache miss. Also use a "with" context manager to
simplify management of the lock lifecycle.
2019-05-08 17:22:00 -05:00
Michael Vincent
e874342103 Node: escape parentheses in ant_glob()
ant_matcher() converts an ANT glob pattern to an equivalent regex
pattern. This commit adds support for escaping parenthesis in the
input pattern so they don't end up being treated as a regex capture
group.

Also add a unit test to verify ant_glob()'s ability to handle special
characters in the input pattern.
2019-05-08 17:22:00 -05:00
ita1024
afa0dd15df Merge branch 'java_deps_1' into 'master'
javaw: set dependency between javac task and use-d generated jars nodes

See merge request ita1024/waf!2232
2019-05-08 05:18:43 +00:00
Federico Pellegrin
b45634d380 javaw: add node dependencies for non-jar tasks to all generated class files 2019-05-08 05:18:31 +02:00
Federico Pellegrin
b22b5636e9 javaw: also when using non-jar CLASSPATH has to be populated to use-d tasks. In this case we point to the directory instead of the JAR file 2019-05-08 05:06:29 +02:00
fedepell
d9babce4ce javaw: set dependency between javac task and use-d generated jars nodes 2019-05-07 14:42:39 +02:00
ita1024
0a61596679 Merge branch 'protoc-java-cdir' into 'master'
protoc: make sure output directory exists for java

See merge request ita1024/waf!2231
2019-05-06 16:15:50 +00:00
fedepell
1837984e7e protoc: make sure output directory exists for java 2019-05-06 08:17:20 +02:00
ita1024
b2d6866096 Merge branch 'pyqt5-cmdline-1' into 'master'
pyqt5 extra enhancements

See merge request ita1024/waf!2229
2019-04-26 05:38:23 +00:00
fedepell
23b09f7493 pyqt5: bugfix, check the correct variable for RCC executable 2019-04-25 11:56:08 +02:00
fedepell
d7f5b986c6 pyqt5: correct the spelling to PySide2 in all occourences 2019-04-25 11:55:31 +02:00
fedepell
6c1465a6ac pyqt5: add option to enable explicitly PyQt5 bindings
Previously one could explicitly state to use PySide2 or PyQt4 but not PyQt5 which was picked just by default. In this way the option can override local configurations and also this prevents to have mixed tools versions if we are sure we need PyQt5.
2019-04-25 11:53:00 +02:00
Thomas Nagy
2e58ac4134
When creating the waf script, assume that the 'extras' folder only contains Python files
Files are also listed in a static arbitrary order.
2019-04-23 07:39:19 +02:00
Thomas Nagy
4ed9af0ee9
Node.listdir outputs are already sorted, do not sort it again in Node.ant_glob 2019-04-23 07:13:02 +02:00
Thomas Nagy
8a32540045
Workaround for Issue 2232 2019-04-22 00:14:17 +02:00
Thomas Nagy
85c499b1cc
Describe how to load md5_tstamp - Issue 2231 2019-04-19 18:47:02 +02:00
ita1024
14ba605138 Merge branch 'doxy' into 'master'
doxygen: maintain order of lines in doxyfile

See merge request ita1024/waf!2223
2019-04-18 06:16:24 +00:00
ita1024
782ee0fcbc Merge branch 'msvcdeps-nostdout' into 'master'
msvcdeps: fix 'WafError' AttributeError

See merge request ita1024/waf!2226
2019-04-18 06:12:37 +00:00
ita1024
61c9415b30 Merge branch 'javadoc-optional' into 'master'
javaw: make javadoc optional

See merge request ita1024/waf!2225
2019-04-18 06:12:08 +00:00
ita1024
88a88fa671 Merge branch 'msvc-debug' into 'master'
msvc: add pdb_install_task with /DEBUG:* flags

See merge request ita1024/waf!2224
2019-04-18 06:11:07 +00:00
Robert Herbst
fc7648b386 javaw: make javadoc optional
Make javadoc optional to support builds on platforms that don't include
javadoc in their Java distribution.
2019-04-16 19:09:43 -05:00
Kevin Markussen
cce984f77b msvcdeps: fix 'WafError' AttributeError
This patch corrects an error in the exec_response_command exception
handler which always assumed that the execution's stdout would be bound
to the the WafError exception object.

However, this assumption is only true when the execution completes with
a non-zero status code. For other exceptions, the stdout attribute is
not bound.

Now, when stdout is not available, the WafError msg will be used
instead.
2019-04-16 17:28:28 -05:00
Lucian Teodorescu
08723978e2 doxygen: maintain order of lines in doxyfile
The order of the lines in a doxyfile are important. This patch uses an
ordered dictionary to keep the keys of the doxyfile in the same order.

This is particularly important for doxyfiles that contain @INCLUDE
lines. In such cases, if the dictionary is not ordered, the @INCLUDE
line can end up in the middle of the generated doxyfile and thus
override all entries that were seen before it.
2019-04-15 18:01:49 -05:00
James Harris
c083461978 msvc: add pdb_install_task with /DEBUG:* flags
Currently PDBs are only installed if the /DEBUG flag appears in the
current toolchain's LINKFLAGS attribute. This patch expands support
so that /DEBUG:FULL and /DEBUG:FASTLINK also cause PDBs to be
installed.
2019-04-15 17:52:03 -05:00
Thomas Nagy
5e90de89d8
Python 2 encoding enhancements - Issue 2230 2019-04-15 21:18:45 +02:00
ita1024
9f2ce1b776 Merge branch 'fix-macos-syms' into 'master'
extras/syms: fix symbol regex on mac-o binaries

See merge request ita1024/waf!2222
2019-04-01 18:55:40 +00:00
William Light
944debb156 extras/syms: fix symbol regex on mac-o binaries
mac-o symbols are prefixed with an underscore. when specifying multiple
sub-regexes (e.g. 'sym1|sym2|sym3'), only the first will be matched
(since the expansion turns into '(?P<symbol>_?sym1|sym2|sym3)'). here,
this is remedied by wrapping the symbol regex in a paren group.
2019-03-31 19:32:39 +02:00
ita1024
e260b4a642 Merge branch 'color-msvc' into 'master'
Add color_msvc tool, which colorizes MSVC output

See merge request ita1024/waf!2221
2019-03-26 06:31:16 +00:00
62b935aec8 Add color_msvc tool, which colorizes MSVC output like GCC does by default 2019-03-20 01:25:48 +00:00
ita1024
bffbcec678 Merge branch 'waf_ut_enc' into 'master'
waf_unit_test: prevent error when dumping run to script and environment contains UTF-8 chars

See merge request ita1024/waf!2220
2019-03-12 16:52:47 +00:00
fedepell
f903ad5f90 waf_unit_test: prevent error when dumping run to script and environment contains UTF-8 chars 2019-03-12 15:46:46 +01:00
Thomas Nagy
02c9f814da
waf-2.0.15 2019-03-10 16:44:06 +01:00
Thomas Nagy
5f811ee018
waf-2.0.15 2019-03-10 16:22:03 +01:00
ita1024
503db290b7 Merge branch 'typos' into 'master'
Typos

See merge request ita1024/waf!2219
2019-03-08 06:41:22 +00:00
Matt Selsky
d8f7fe165f Typos 2019-03-07 22:13:40 -05:00
Thomas Nagy
b1baa2b8e1
Revert the args file threshold on non-win32 systems from #2214 2019-03-03 17:43:34 +01:00
Thomas Nagy
b72fabf8e5
Do not expose Task.allow_argsfile and remove allow_argsfile from non-Task class #2216
The class waflib.Tools.winres.rc_parser is not a subclass of waflib.Task.Task:
rc_parser -> c_preproc.c_parser -> object
2019-03-03 17:04:53 +01:00
ita1024
e3c0c1b571 Merge branch 'add-allow_argsfile-to-tasks' into 'master'
task: winres: allow tasks to disable @argsfile

Closes #2224

See merge request ita1024/waf!2216
2019-03-03 15:15:36 +00:00
ita1024
7aa608889d Merge branch 'fix-path-calculations-in-git-bash' into 'master'
Utils: only use msys2 paths from msys2 python

See merge request ita1024/waf!2217
2019-02-26 17:26:32 +00:00
James Harris
84fd982f4b Utils: only use msys2 paths from msys2 python
This patch attempts to detects if, when we are running from within an
MSYS2 environement (MSYSTEM is set) we are also executing inside an
MSYS2 provided version of python. It does this by assuming that if we
are not in a cygwin environment and we are building on windows, If the
value of sys.executable is /usr/bin or /bin or /usr/local/bin (somethign
unixy) then we are running in an MSYS2 python interpreter and shoudl
compensate for msys2 root paths. Otherwise we shouldn't be doing extra
path manipulation.
2019-02-26 17:26:32 +00:00
Thomas Nagy
57377901fe
Fix 4046e48ac1 from #2214
TypeError: can only concatenate list
2019-02-24 10:50:44 +01:00
James Harris
9599cc532f task: winres: allow tasks to disable @argsfile
Not all tools executed by tasks support the '@argsfile' syntax for
shunting commandline arguments to a file. This means that if such
commands are shunted to a file early, he command will not work. On
windows the rc.exe command is such an example, but some tools on linux
have similar limitations. In the posix case, we artifically limit our
commandline size because it is difficult/variable to caluclate what the
actual limit is (it is partially dependent on environment size). This
could artifically cause commands to fail due to commandline length when
they otherwise wouldn't.

This patch fixes this issue by adding the 'allow_argsfile' flag to the
task. This way certain task instances will be able to specify if they
are compatible with the '@argsfile' syntax or not.
2019-02-19 12:48:04 -06:00
ita1024
2af495bcad Merge branch 'bug-2225-fix' into 'master'
Address ntpath bug with empty prefix

See merge request ita1024/waf!2215
2019-02-18 18:05:19 +00:00
James Harris
17b69226c4 Address ntpath bug with empty prefix
This patch addresses the bug described in issue #2225 where in using
posix paths and an empty PREFIX value can result in files being
installed to the root of the drive specified by destdir instead of to
the desired prefix value.  This is a bug in the assumption that user
specified paths that are strings will contain directory separators that
match the target operating system.
2019-02-18 11:38:45 -06:00
ita1024
bd3431e483 Merge branch 'fix-cmd-length-calculation' into 'master'
task: calculate correct cmdline bytes

See merge request ita1024/waf!2214
2019-02-15 17:33:27 +00:00
James Harris
4046e48ac1 task: calculate correct cmdline bytes
The previous patches to workaround
http://support.microsoft.com/kb/830473 drastically over estimated the
number of characters in commands by treating the repr() version of the
command array as a reasonable estimator of commandline length. This
caused commands attempt to write argsfiles before they should have.

The new calculation calculates the number characters in the command
array and adds the number of spaces that would be added by ' '.join(cmd)
this provides a much closer estimate of the commandline length.

This also limits the CLI-length on non windows platforms to 200kB. This
prevents us hitting the much larger argument limits on Linux/BSD/MacOS
platforms.
2019-02-15 10:50:27 -06:00