aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-11-04Handle only llvm-objdump being availableJon Turney1-3/+7
llvm-objdump currently doesn't appear to output the Windows subsystem, so that part of the test needs to be skipped.
2018-11-04Use compiler detector in detect_system_compiler()Jon Turney1-11/+15
Use the compiler detector in detect_system_compiler(), rather than trying to guess based on what it is the PATH (which could utterly fail e.g when CC env var is set) Note that this detection is only used by platform_fix_name() to interpret installed_files.txt
2018-11-04Fix a bug in test_compiler_detectionJon Turney1-0/+2
AR wasn't reset in the environment, so this test could fail if more than one language compiler was specified in the environment and the linker wasn't 'ar'
2018-11-04Use lld-link with clang-clJon Turney2-3/+9
Use lld-link dynamic linker with clang-cl Don't hardcode dynamic linker name in tests
2018-11-04Use llvm-lib as an alternative to libJon Turney1-4/+5
Detect llvm-lib as an alternative Windows static linker to lib
2018-11-04Qualify checks of self.version by self.id in VisualStudioC/CPPCompilerJon Turney2-10/+17
2018-11-04azure: Add clang-cl/ninja to matrixJon Turney2-1/+19
Note that Vs2017 tools are also in PATH for llvm build
2018-11-04Adjust more tests which need to know compiler typeJon Turney6-9/+11
2018-11-04Use 'rc' resource compiler with clang-cl toolchainJon Turney2-2/+2
The LLVM toolchain doesn't come with a Windows resource compiler at the moment. Use 'rc' from the Windows SDK.
2018-11-04Make use of get_argument_syntax() in test casesJon Turney7-17/+14
2018-11-04Accomodate clang-cl in test common/127Jon Turney1-1/+1
clang-cl does support '-Wmissing-include-dirs' (unlike msvc), but doesn't (currently) support '/ZI' (which is used by the default 'debug' buildtype), the presence of which will cause an 'unknown-argument' warning, which is treated as an error with 'Werror'. Adjust the default buildtype so this test can pass with clang-cl
2018-11-04Rewrite test common/100 manygen using get_argument_syntax()Jon Turney2-22/+15
Rewrite test common/100 manygen using get_argument_syntax(), so it treats clang-cl as cl, can handle only clang-cl being available, and try to make it a bit less convoluted.
2018-11-04Teach unit test test_compiler_detection about clang-clJon Turney1-0/+4
v2: Update for ClangClCcompiler class v3: Reorder compilers to simplify
2018-11-04Teach VisualStudioCCompiler.get_pch_use_args() to handle clang-clJon Turney1-0/+2
It seems that clang-cl isn't quite compatible with cl in the way it handles pch, and when the precompiled header is used, the pathname of the header is needed, not just its filename. This fixes test\common\13 pch with clang-cl
2018-11-04Teach VisualStudioCCompiler.has_arguments() about clang-clJon Turney1-0/+2
When invoked as clang-cl to compile, it doesn't emit cl-compatible D9002 warnings about unknown options, but fortunately also supports -Werror-unknown-argument instead. When invoked to link, and using LINK, it does emit cl-compatible LNK4044 warnings about unknown options.
2018-11-04Only add link arguments when needed in Compiler object methodsJon Turney3-14/+20
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.
2018-11-04Accomodate clang-cl /showIncludes outputJon Turney1-2/+3
Accomodate clang-cl /showIncludes output in detect_vs_dep_prefix(). clang-cl outputs lines terminated with \n, not \r\n v2: should invoke the detected compiler, not hardcode 'cl'
2018-11-04Detect clang-cl as msvc-like, not clang-likeJon Turney10-24/+48
Handle clang's cl or clang-cl being in PATH, or set in CC/CXX Future work: checking the name of the executable here seems like a bad idea. These compilers will fail to be detected if they are renamed. v2: Update compiler.get_argument_type() test Fix comparisons of id inside CCompiler, backends and elsewhere v3: ClangClCPPCompiler should be a subclass of ClangClCCompier, as well Future work: mocking in test_find_library_patterns() is effected, as we now test for a subclass, rather than self.id in CCompiler.get_library_naming()
2018-11-03Add new compiler.get_argument_syntax methodDylan Baker8-25/+112
Some compilers try very had to pretend they're another compiler (ICC pretends to be GCC and Linux and MacOS, and MSVC on windows), Clang behaves much like GCC, but now also has clang-cl, which behaves like MSVC. This method provides an easy way to determine whether testing for MSVC like arguments `/w1234` or gcc like arguments `-Wfoo` are likely to succeed, without having to check for dozens of compilers and the host operating system, (as you would otherwise have to do with ICC).
2018-11-02interpreter: Don't warn about clang b_undef and b_sanitizer if sanitizer is noneDylan Baker1-1/+2
Since the "none" sanitizer isn't actually a sanitizer at all.
2018-11-02Cosmetic fix to failed required dependency reportingJon Turney1-1/+2
As mentioned in #4407, if dependency('boost') fails, the error message is 'Dependency "boost" not found, tried' (sic). Similar to line 1451 above, suppress reporting the tried methods returned by log_tried(), if the list is empty (as is the case with boost)
2018-11-02ninjabackend: add generated source files to jar compile target source listAurélien Zanelli6-0/+63
Otherwise, passing result of custom_target() to jar() target is ignored and won't be compiled resulting in build fail.
2018-11-02extract_all_sources: Also include generated object filesXavier Claessens2-1/+13
Closes #4281.
2018-11-02Fix incorrect checking of build machine for dependency availabilityJon Turney2-3/+3
Don't check the build machine to determine a dependency whose availability is static property of the host machine
2018-11-02Fail some impossible cross-detectionsJon Turney2-1/+14
Make some detections I can't see how to make work in a cross-environment fail.
2018-11-02meson: cache get_target_generated_dirMarcel Hollerbach1-0/+2
This reduces the build time about 2 sec. The result itself is not hard to calculate. However, persistent join calls with the same 2 strings are not that usefull. This also caused about 600'000 calls to get_target_dir, we are now down to 60'000 calls form this function to get_target_dir.
2018-11-02meson: performance optimizethe file objectMarcel Hollerbach1-0/+5
reduce the amount of access calls to the os. This safes ~1 sec. build time
2018-11-02Reformat Meson file for readability.Jussi Pakkanen1-10/+10
2018-11-02Make string division do path joining.Jussi Pakkanen5-5/+43
2018-10-30Hoist gen_vs_module_defs_args from Gnu to GnuLike.Josh Gao1-10/+10
Support vs_module_defs when cross-compiling to Windows with clang. Fixes #4434.
2018-10-30Generalize gnulike-targeting-windows checks.Josh Gao3-6/+6
Replace several checks against GCC_MINGW or (GCC_MINGW, GCC_CYGWIN) with is_windows_compiler instead, so that clang and other gcc-like compilers using MinGW work appropriately with vs_module_defs, c_winlibs, and cpp_winlibs. Fixes #4434.
2018-10-30Fix crlf line endingsDylan Baker3-90/+91
mark .icns files as binary so git will stop trying to fix the line endings, and recommit the remaining .crlf files
2018-10-29Fix merge file using an array. Closes #4424.Jussi Pakkanen2-1/+5
2018-10-29Print dependencies being used for compiler checksNirbheek Chauhan2-30/+49
It is a common idiom to look for a function or a specific type or a header in various locations/libraries, and it can be confusing to see the (seemingly) identical compiler check being done multiple times. Now we print the dependencies being used when a compiler check is run Before: Checking for function "fbGetDisplay": NO Checking for type "GLeglImageOES": YES Checking for function "asinh": YES After: Checking for function "fbGetDisplay" with dependency egl: NO Checking for type "GLeglImageOES" with dependencies glesv2, gl: YES Checking for function "asinh" with dependency -lm: YES
2018-10-29Rollback if an optional subproject failsXavier Claessens5-1/+23
If a subproject is not required and fails during its configuration, the parent project continues, but should not include any target or state set by the failed subproject. This fix ninja still trying to build targets generated by subprojects before they fail in their configuration. The 'build' object is now per-interpreter instead of being global. Once a subproject interpreter succeed, values from its 'build' object are merged back into its parent 'build' object.
2018-10-28get_base_compile_args: Add -fprofile-correction to -fprofile-useJan Alexander Steffens (heftig)1-2/+2
This allows using the imperfect profiles generated by multithreaded programs. Without the argument, GCC fails to load them. Clang just ignores the argument AFAICT. Fixes https://github.com/mesonbuild/meson/issues/2159
2018-10-28Fix bug in PerMachine constructorJohn Ericson1-1/+1
Don't make single element tuple
2018-10-27docs: Fix gcc attribute list link [skip ci]Nirbheek Chauhan2-2/+2
2018-10-27No tabs, only spaces. [skip ci]Jussi Pakkanen1-14/+14
2018-10-27wrap: Check the directory key is a name and not a pathXavier Claessens1-0/+2
Closes #1413.
2018-10-27add -permissive to the boost testNicole Mazzuca1-0/+6
2018-10-27add support for `/permissive-`Nicole Mazzuca1-8/+21
We do this with `std_ver=vc++NM` - `vc++` does not add `/permissive-`, while `std_ver=c++NM` adds `/permissive-`.
2018-10-27tests/llvm: Allow test to run with static-only llvmDylan Baker1-8/+17
Like on windows, where shared llvm isn't support.
2018-10-27dependencies/base: Replace windows path separators with \\\\Dylan Baker1-0/+3
Replace '\\' with \\\\ in config values args. Otherwise shlex will helpfully remove path separators on windows, resulting in values like: `-Ic:mydataishere` fixup! dependencies/base: Replace windows path separators with /
2018-10-27Reorder test runs.Jussi Pakkanen1-19/+7
First do VS2015 since it is the most likely to break. Cygwin is last because it is the slowest. Remove VS2017 because it is being handled by Azure.
2018-10-27docs: Fix hotdoc warnings [skip ci]Dylan Baker2-10/+10
Hotdoc really wants internal links to point to the .md files instead of the generated names. Which makes sense, as we're currently relying on the fact that meson only generated .html pages.
2018-10-27docs: Add documentation to custom_targets for codegen [skip ci]Dylan Baker2-1/+72
Including the following that has come up several times recent: - How to use codegen for headers (that each target that uses the header needs the object in it's sources) - Using custom_targets with multiple outputs
2018-10-26add implib support for ArmclangCompiler (#4420)pbl1-0/+14
2018-10-25Merge pull request #4326 from Ericson2314/per-machineJussi Pakkanen2-28/+167
Start leveraging MachineInfo with for_* methods
2018-10-25Detect powerpc processors on FreeBSD. Closes #4397.Jussi Pakkanen1-0/+13