| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
* Add a new compiler object method: has_members
Identical to 'cc.has_member', except that this takes multiple members
and all of them must exist else it returns false.
This is useful when you want to verify that a structure has all of
a given set of fields. Individually checking each member is horrifying.
* Fix typo in exceptions for has_member(s)
|
| | |
|
| |
|
|
| |
Works around / resolves #702.
|
| |\
| |
| | |
Implement D support
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
D allows programmers to define their tests alongside the actual code in
a unittest scope[1].
When compiled with a special flag, the compiler will build a binary
containing the tests instead of the actual application.
This is a strightforward and easy way to run tests and works well with
Mesons test() command.
Since using just one flag name to enable unittest mode would be too
boring, compiler developers invented multiple ones.
Adding this helper method makes it easy for people writing Meson build
descriptions for D projects to enable unittestmode.
[1]: https://dlang.org/spec/unittest.html
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds support for the D programming language[1] to Meson.
The following compilers are supported:
* LDC
* GDC
* DMD
[1]: http://dlang.org/
|
| |/ |
|
| |
|
|
| |
The consumer might append to it, which will mess up the original object
|
| | |
|
| |\
| |
| | |
Fix filenames and paths used in DLL shared library generation
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit contains several changes to the naming and versioning of
shared and static libraries. The details are documented at:
https://github.com/mesonbuild/meson/pull/417
Here's a brief summary:
* The results of binary and compiler detection via environment functions
are now cached so that they can be called repeatedly without
performance penalty. This is necessary because every
build.SharedLibrary object has to know whether the compiler is MSVC or
not (output filenames depend on that), and so the compiler detection
has to be called for each object instantiation.
* Linux shared libraries don't always have a library version. Sometimes
only soversions are specified (and vice-versa), so support both.
* Don't use versioned filenames when generating DLLs, DLLs are never
versioned using the suffix in the way that .so libraries are. Hence,
they don't use "aliases". Only Linux shared libraries use those.
* OS X dylibs do not use filename aliases at all. They only use the
soversion in the dylib name (libfoo.X.dylib), and that's it. If
there's no soversion specified, the dylib is called libfoo.dylib.
Further versioning in dylibs is supposed to be done with the
-current_version argument to clang, but this is TBD.
https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-SW23
* Install DLLs into bindir and import libraries into libdir
* Static libraries are now always called libfoo.a, even with MSVC
* .lib import libraries are always generated when building with MSVC
* .dll.a import libraries are always generated when building with
MinGW/GCC or MinGW/clang
* TODO: Use dlltool if available to generate .dll.a when .lib is
generated and vice-versa.
* Library and executable suffix/prefixes are now always correctly
overriden by the values of the 'name_prefix' and 'name_suffix' keyword
arguments.
|
| | | |
|
| |/
|
|
| |
GCC thinks it is not talking to a terminal.
|
| |
|
|
|
|
| |
* GnuCPPCompiler: allow usage of GNU extensions
* Add myself to authors.txt
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This causes intermittent build failures in the MSVC CI because of a race
with the default anti-virus that ships with Windows while writing the
.pdb file: https://ci.appveyor.com/project/jpakkane/meson/build/1.0.58
There's a separate fix for that in the works that will fix this in the
general case, but for compiler tests we don't need to generate the pdb
file at all. So, just fetch the CRT flag (/MDd) if needed instead.
This has the side-effect of making compiler tests that use self.links
and self.run faster.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Otherwise the changes ripple upstream and modify extra_args in the callee
|
| |
|
|
| |
multiple invocations.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This allows the user to specify custom arguments to the compiler to be used
while performing cross-compiler checks. For example, passing a GCC specs file as
c_link_args so that a "prefix" filled with libraries that are to be compiled
against can be found with cc.find_library, or an `-mcpu` c_arg that is required
for compilation.
Also ensure that unix_link_flags_to_native() and unix_compile_flags_to_native()
always return a copy of the original arguments and not a reference to the
original arguments. We never want to modify the original arguments.
|
| |
|
|
|
| |
The cross-extra-flags were being overwritten and ignored. Also, we don't
link while doing a cross-compiled sanity check even with ObjC++
|
| | |
|
| | |
|
| |
|
|
| |
#583.
|
| | |
|
| |
|
|
|
| |
This is required for checking for compiler checks that involve linking
to a static library with MSVC. Without this, MSVC errors out since no
CRT is specified.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
(#559)
Fixes https://github.com/mesonbuild/meson/issues/558
|
| |\
| |
| | |
Build transparently with a custom standard library
|
| | |
| |
| |
| | |
said language.
|
| |\ \
| | |
| | | |
Fix the MSVC sanity check to use the generic C/C++ sanity check
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Consolidate the C/C++ compiler sanity checks since the test code is almost
exactly the same, and then use that for the MSVC C/C++ compilers as well. All
these sanity checks had diverged because of the code duplication.
This also fixes an intermittent sanity check failure that I was seeing with
MSVC.
Note: The ObjC/C++ compilers can also probably use the same implementation.
|
| | | |
| | |
| | |
| | | |
Popen.communicate() already waits for the process to complete.
|
| |\ \ \
| | | |
| | | | |
compilers: Always include limits.h to make the stub machinery work
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
limits.h is a requirement of the C language and is available with all compilers
and platforms from the last two decades. If limits.h is not available, the
compiler only supports an ancient dialect of C and lots of other things will
break too.
|
| |/ / |
|
| | |
| |
| |
| |
| |
| | |
The fallback test was making the stub check on Linux/glibc completely useless.
Fixes #535
|
| | |
| |
| |
| |
| |
| | |
This also detects when the header has re-defined the symbol to something
else that is then provided by libc, which is also a case we want to
support.
|
| | |
| |
| |
| |
| |
| | |
With the change to cc.links to translate unix link flags, this is no
longer needed and is wrong because it hasn't kept-up with the improved
default cc.find_library implementation.
|
| | |
| |
| |
| |
| | |
This allows build files to pass -L and -l flags and have them converted
automatically as needed.
|
| | |
| |
| |
| |
| |
| |
| | |
cross_alignment
The previous check was failing while checking pointer sizes such as
void* due to a syntax error.
|
| |/ |
|
| |
|
| |
compilers: Fix cross_sizeof when the type doesn't exist
|
| |\
| |
| | |
Use the linker to check if a specific function is provided by the toolchain or runtime
|