aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-09-21 17:38:46 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2018-11-04 15:42:06 +0000
commitbb31a8c1c752cff6f969e345f3a170f935f159cf (patch)
treee22055c7bade464334de3e7b2e3d23a1e7cd474c /run_unittests.py
parente57fd018308e0ea5185391b3b6a76bb47479b7d7 (diff)
downloadmeson-bb31a8c1c752cff6f969e345f3a170f935f159cf.zip
meson-bb31a8c1c752cff6f969e345f3a170f935f159cf.tar.gz
meson-bb31a8c1c752cff6f969e345f3a170f935f159cf.tar.bz2
Only add link arguments when needed in Compiler object methods
Currently, ComplierHolder.determine_args() unconditionally adds the link arguments to the commmand, even if we aren't linking, because it doesn't have access to the mode (preprocess, compile, link) that _get_compiler_check_args() will use. This leads to command lines like: 'cl testfile.c /nologo /showIncludes /c /Fooutput.obj /Od kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib' which clang-cl considers invalid; MSVS cl accepts this, ignoring the unneeded libraries Change from passing extra_args down to _get_compiler_check_args(), to passing down a callback to CompilerHolder.determine_args() (with a bound kwargs argument), so it can consult mode and kwargs to determine the args to use.
Diffstat (limited to 'run_unittests.py')
0 files changed, 0 insertions, 0 deletions