Commit Graph

215 Commits

Author SHA1 Message Date
Elliott Sales de Andrade f2fed5052d Allow passing files to compile/link/run queries. 2016-09-29 04:44:01 -04:00
Elliott Sales de Andrade 51341ce177 Reduce redundancy in compile/link/run queries. 2016-09-29 04:43:59 -04:00
Nirbheek Chauhan a001fa0fb6 compilers: Make GCC detection more robust on all platforms
Fixes https://github.com/mesonbuild/meson/issues/650

Also adds new has_define and get_define internal API for querying
pre-processor defines provided by GNU compilers.
2016-09-27 00:27:38 +05:30
Matthew Waters 13e91ab499 Add dependency support to the checks using the compiler
It is extremely common to need to know within a given dependency if
a given header, symbol, member, function, etc exists that cannot be
determined from the version number alone.

Without passing dependency objects to the various compiler/linker
checks and with many libraries headers/libraries being located in
their own subdirs of the standard prefix, the check for the library
would not find the header/function/symbol/etc.

This commit allows passing dependency objects to the compiler checks so
that the test program can be compiled/linked/run with the necessary
compilation and/or linking flags for that library.
2016-09-26 20:25:17 +03:00
Nirbheek Chauhan 4ceaa395b5 compilers: Populate Rust and Vala compiler ids
These two have only one implementation, so just name them as they are
2016-09-26 19:48:46 +05:30
Nirbheek Chauhan b89c52e844 compilers: Remove duplicate class methods
These can just be implemented by the base Compiler class
2016-09-26 19:48:46 +05:30
Nirbheek Chauhan ece29e32a8 compilers: Consolidate language suffix mapping
Instead of spreading it across the entire file and re-implementing
can_compile for each compiler, consolidate it in one dictionary which
the base compiler class can refer to based on self.language set by the
child class.

This has fixed a number of hidden and unreported bugs due to bitrotten
can_compiler implementations.
2016-09-26 19:48:46 +05:30
Nirbheek Chauhan e8dc13248e compilers: Fix typo in visual studio warning argument 2016-09-25 09:41:07 +05:30
Nirbheek Chauhan e459fd2f53 compilers: Fall back to -pedantic with older GCC
Fixes https://github.com/mesonbuild/meson/issues/242
2016-09-25 07:53:49 +05:30
Jussi Pakkanen f1b6c89d9c Option for ndebug. 2016-09-16 21:51:29 +03:00
Jussi Pakkanen 7d24f96d2d Merge pull request #774 from mesonbuild/compilerreorg
Move compiler common functionality to own class
2016-09-14 19:12:09 +03:00
Jussi Pakkanen c334eeda76 Merge pull request #684 from mesonbuild/pdb
Create pdb files with MSVC
2016-09-11 13:04:55 +03:00
Nirbheek Chauhan 4228a6dab6 vs: Never serialize debug file generation with /FS
/FS forces .pdb file writing to be serialized through MSPDBSRV.EXE,
which is supposed to solve concurrency issues (esp. with anti-viruses),
but it doesn't actually always work. It also isn't needed anymore since
we don't use a shared vcXXX.pdb temporary file for pdb writing and use
/Fd to explicitly set a per-target pdb filename instead.

Not serializing the PDB writing will make a large difference on fast
disks when linking multiple libraries and executables simultaneously.
2016-09-11 10:10:46 +05:30
Jussi Pakkanen 873558b2b4 Reorganisation. 2016-09-10 17:41:01 +03:00
Jussi Pakkanen e57c626337 Clang C++ compiler uses common class. 2016-09-10 17:39:03 +03:00
Jussi Pakkanen 20083c0694 Factored Clang common stuff in its own class. 2016-09-10 17:19:51 +03:00
Jussi Pakkanen 26f9adf6a6 Moved base options to base class, because they are always the same. 2016-09-10 17:07:18 +03:00
Jussi Pakkanen 5833d23e76 Made objc compilers use Gnu class. 2016-09-10 17:05:20 +03:00
Jussi Pakkanen 85c2f67079 Made C++ compiler use GNU class. 2016-09-10 17:00:00 +03:00
Jussi Pakkanen 2336624f4a Refactored GNU common functionality into its own class. 2016-09-10 16:56:22 +03:00
Jussi Pakkanen b289547971 Force clang to error out on unknown arguments. Closes #755. 2016-09-04 22:28:25 +03:00
Jussi Pakkanen a9da6c5132 Moved targets with same name into subdirs to make all tests pass. 2016-09-02 22:52:37 +03:00
Elliott Sales de Andrade 4c71695e41 Use context manager for file I/O.
There are a few cases where a context manager cannot be used, such as
the logger.
2016-08-27 18:29:55 -04:00
Nirbheek Chauhan 7830cb61c3 Add a new compiler object method: has_members (#723)
* 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)
2016-08-27 17:26:23 +03:00
Matthias Klumpp d98959f2cb Make D compilers return colored output by default 2016-08-22 21:09:27 +02:00
Matthias Klumpp 76fe77f9a8 Don't automatically override the -L flag of D compilers
Works around / resolves #702.
2016-08-22 21:07:58 +02:00
Jussi Pakkanen 399d653803 Merge pull request #685 from ximion/master
Implement D support
2016-08-21 13:22:19 +03:00
Matthias Klumpp 309f7a1b4a interpreter: Rename get_unittest_flag() to unittest_args() 2016-08-21 01:41:14 +02:00
Matthias Klumpp b80bdf65df Simplify D compiler argument translation 2016-08-21 01:39:48 +02:00
Jussi Pakkanen 5a926172e6 No fpic on Windows C++. Closes #690. 2016-08-20 23:13:25 +03:00
Matthias Klumpp 57c54a678c Allow build definitions to retrieve the unittest flag of a D compiler
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
2016-08-20 18:48:28 +02:00
Matthias Klumpp 56823272ab Implement D support
This patch adds support for the D programming language[1] to Meson.

The following compilers are supported:
* LDC
* GDC
* DMD

[1]: http://dlang.org/
2016-08-19 03:02:51 +02:00
Jussi Pakkanen 1bed33fba2 Create pdbs that work when using pch or doing extract object (sadly not both). 2016-08-18 22:56:14 +03:00
Jussi Pakkanen 402ef505fe Fix unixy compilation. 2016-08-18 00:36:18 +03:00
Jussi Pakkanen b08581d394 Generate pdb files during linking. 2016-08-17 23:50:50 +03:00
Jussi Pakkanen 5e047d9c91 Write pdb info to a specific file. 2016-08-17 23:28:35 +03:00
Nirbheek Chauhan 5b7e4ac1f6 compilers: Always return a copy of the exelist
The consumer might append to it, which will mess up the original object
2016-08-12 15:34:18 +05:30
Jussi Pakkanen 58ca96994f Add option for as-needed link option. 2016-08-02 22:24:54 +03:00
Jussi Pakkanen 64919b1c74 Merge pull request #417 from nirbheek/dll-paths
Fix filenames and paths used in DLL shared library generation
2016-07-13 22:18:50 +03:00
Jussi Pakkanen a0666ebf9c Gcc versions older than 4.9 do not support color output. 2016-07-01 23:38:25 +03:00
Jussi Pakkanen 4f63fe4983 Enable colored output with GCC. Ninja redirects stdout/stderr so by default GCC thinks it is not talking to a terminal. 2016-07-01 23:18:06 +03:00
Nirbheek Chauhan 0143c32c7c Overhaul versioning and naming of libraries
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.
2016-07-01 20:50:47 +05:30
Zhe Wang bc347aed0b GnuCPPCompiler: allow usage of GNU extensions (#619)
* GnuCPPCompiler: allow usage of GNU extensions

* Add myself to authors.txt
2016-06-27 19:31:07 +03:00
Nirbheek Chauhan 4934e70092 Don't pass pdb flags while linking inside compiler tests (#614)
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.
2016-06-24 13:47:47 +03:00
Jussi Pakkanen 06a5853fde Thank you ever so much Git. 2016-06-24 13:46:20 +03:00
Jussi Pakkanen b6e8809f25 Added minsize build type that optimizes for binary size. 2016-06-23 22:38:18 +03:00
Jussi Pakkanen 436eab9b85 Print full mesonlog on failed tests when run under CI. 2016-06-23 00:03:59 +03:00
Nirbheek Chauhan c03870b798 compilers: Copy extra_args whenever we modify it
Otherwise the changes ripple upstream and modify extra_args in the callee
2016-06-21 03:24:48 +05:30
Jussi Pakkanen 10f6295ca8 Do not use [] as a function default argument as the variable persists over multiple invocations. 2016-06-21 00:38:07 +03:00
Nirbheek Chauhan 7c90beefde find_library: Also accept extra_dirs as a single string argument 2016-06-21 02:30:52 +05:30
Nirbheek Chauhan abf81aab77 Use cross-info c_args, c_link_args, etc for all compiler checks
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.
2016-06-15 13:13:06 +05:30
Nirbheek Chauhan 777c1e9c19 compilers: Fix usage of cross tools args in sanity checks
The cross-extra-flags were being overwritten and ignored. Also, we don't
link while doing a cross-compiled sanity check even with ObjC++
2016-06-15 11:03:28 +05:30
Martin Hostettler 4979b4c84f compiler: Use cross tools args in sanity check. 2016-06-13 00:41:19 +02:00
Jussi Pakkanen d4adf0983b Add special casing for VS which ignores unknown arguments. 2016-06-11 13:27:04 +03:00
Jussi Pakkanen beef7cb291 Added functionality to pick the first supported argument from a list. Closes #583. 2016-06-09 21:36:58 +03:00
Jussi Pakkanen d8d989d9b8 Add a has_arg method to compiler to check whether it supports a given argument. 2016-06-09 21:19:58 +03:00
Nirbheek Chauhan 9f4d963bd9 compilers: Add the buildtype args for checks that perform linking (#543)
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.
2016-05-30 21:57:58 +03:00
Jussi Pakkanen a6712b7f20 Can haz next revision of C++ standard. 2016-05-30 20:13:56 +03:00
Jussi Pakkanen 92dfc4eb0b Pch disabling works now. 2016-05-30 20:11:36 +03:00
Nicolas Schneider 60bca15e78 set working dir for sanity check compilation 2016-05-26 12:01:21 +02:00
Nirbheek Chauhan 7aa24c7d0a compilers: Fix header stub change that broke has_function checks on Windows (#559)
Fixes https://github.com/mesonbuild/meson/issues/558
2016-05-26 00:31:51 +03:00
Jussi Pakkanen df03f849a8 Merge pull request #542 from mesonbuild/ownstdlib
Build transparently with a custom standard library
2016-05-25 23:44:24 +03:00
Jussi Pakkanen 255208fd60 Merge pull request #540 from centricular/sanity_check_msvc_fix
Fix the MSVC sanity check to use the generic C/C++ sanity check
2016-05-25 23:41:12 +03:00
Jussi Pakkanen 8119207ee2 Merge pull request #547 from centricular/limits-h_needed_for_stubs
compilers: Always include limits.h to make the stub machinery work
2016-05-25 23:40:44 +03:00
Nirbheek Chauhan 4578e11618 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.
2016-05-24 12:18:59 +05:30
Nirbheek Chauhan 3776975203 compilers: Remove duplication in sanity check implementations
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.
2016-05-22 09:36:54 +05:30
Jussi Pakkanen afe7252476 Can specify a stdlib subproject that is used implicitly on all targets with said language. 2016-05-21 21:46:03 +03:00
Jussi Pakkanen 1574471822 Option for GCC STL debug mode. 2016-05-21 16:31:21 +03:00
Nirbheek Chauhan 58386c4df3 compilers: Remove spurious wait while running sanity check
Popen.communicate() already waits for the process to complete.
2016-05-18 03:58:59 +05:30
Nirbheek Chauhan c9f16a4ab1 cc.has_function: Don't forget to check for stubs in the fallback test
The fallback test was making the stub check on Linux/glibc completely useless.

Fixes #535
2016-05-16 07:49:37 +05:30
Nirbheek Chauhan 2300c022c2 has_function: Also detect function implementations inside headers
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.
2016-05-04 00:17:27 +05:30
Nirbheek Chauhan aa7202d42f compilers: Remove outdated MSVC implementation of cc.find_library
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.
2016-04-19 14:13:45 +05:30
Nirbheek Chauhan d87f2f5b42 compilers: Convert args to cc.{links,run} from unix to native
This allows build files to pass -L and -l flags and have them converted
automatically as needed.
2016-04-19 00:32:02 +05:30
Nirbheek Chauhan 2c687b02c2 Fix symbol-exists check for cross_sizeof and add the same check to cross_alignment
The previous check was failing while checking pointer sizes such as
void* due to a syntax error.
2016-04-15 18:51:41 +05:30
Nirbheek Chauhan 9a9654c4bd Fix off-by-one in cross_sizeof and cross_alignment on MSVC 2016-04-15 17:49:58 +05:30
Nirbheek Chauhan b56f008f80 compilers: Fix cross_sizeof when the type doesn't exist (#514)
compilers: Fix cross_sizeof when the type doesn't exist
2016-04-14 21:46:09 +03:00
Jussi Pakkanen 5d65c4b678 Merge pull request #490 from centricular/has_function_link
Use the linker to check if a specific function is provided by the toolchain or runtime
2016-04-13 19:09:22 +03:00
Nirbheek Chauhan e72523ae41 compilers: Use compiler-specific no-optimization flags
MSVC doesn't understand -O0. It uses -Od (or /Od) instead.
2016-04-11 04:30:48 +05:30
Nirbheek Chauhan 804a3ca72a compilers: Debug optimization level should be -O0 (#509)
Without any -O options, gcc does not generate properly debuggable code.



> With no -O option at all, some compiler passes that collect information useful

> for debugging do not run at all



gcc recommends -Og, but that isn't supported by clang, so we use -O0



See https://github.com/mesonbuild/meson/pull/509 for more discussion
2016-04-07 22:16:45 +03:00
Nirbheek Chauhan 4e084e7ac1 compilers: Also support built-in functions in cc.has_function 2016-04-07 20:53:12 +05:30
Tim-Philipp Müller 1934ddfc5b Improve cc.has_function() check to not require any includes and detect stubs
We now use .links() to detect if a C compiler function is available
or not, that way the user doesn't need to specify all the possible
includes for the check, which simplifies things considerably.

Also detect glibc stub functions that will never work and return
false for them.

Closes #437
2016-04-07 20:53:12 +05:30
Nirbheek Chauhan 700010e452 New API: cc.has_header_symbol to check if a header defines a specific symbol
Also supports a 'prefix' keyword argument for feature checks such as _GNU_SOURCE
or for headers that need to be included first
2016-04-07 20:53:12 +05:30
Jussi Pakkanen cab5ce4fc0 Merge pull request #438 from trhd/testing_options
New options for controlling test output.
2016-04-06 23:10:20 +03:00
Jussi Pakkanen 737fde65fa Bring back the old manual search to cc.find_library. 2016-04-04 22:18:14 +03:00
Jussi Pakkanen 873ffe782c Merge pull request #390 from nirbheek/msvc-module-defs
Add support for passing a module definitions file for exporting symbols while linking
2016-04-03 18:12:18 +03:00
Jussi Pakkanen e0792295bc Whitespace fixing. 2016-04-03 18:00:41 +03:00
Jussi Pakkanen 6291fb4056 Put buildtype flags to vala compiles. 2016-04-03 16:44:18 +03:00
Jussi Pakkanen 3415c3a693 Add coverage option to compilers. 2016-04-02 19:13:26 +03:00
Hemmo Nieminen 336904b553 Move MesonException from coredata to mesonlib. 2016-04-01 00:52:45 +03:00
Nirbheek Chauhan 1713fa0297 Add shared_library argument for a Visual Studio module definitions file
On MSVC, shared libraries only export symbols that have been explicitly exported
either as part of the symbol prototype or via a module definitions file.

On compilers other than MSVC, all symbols are exported in the shared library by
default and the format for the list of symbols to export is different, so this
is only used with the VisualStudio compiler.

The module defs file path can either be relative to the current source directory
or an absolute path using meson.source_root() + '/some/path'
2016-03-30 16:24:35 +05:30
Jussi Pakkanen 37d7473615 Merge pull request #478 from centricular/sizeof_no_symbol
Return -1 from cc.sizeof if the symbol could not be found
2016-03-28 18:36:35 +03:00
Nirbheek Chauhan a8c6fd6aa4 compilers: Return -1 from cc.sizeof if the symbol could not be found
Allows people to avoid adding a separate check for the symbol existing in case
it's platform-specific
2016-03-28 20:43:15 +05:30
Tim-Philipp Müller 8945c85f96 Fix up typo in precompiled headers base option handling 2016-03-20 22:57:49 +00:00
Jussi Pakkanen d87eb7d290 Merge branch 'base_options'. 2016-03-20 22:04:24 +02:00
Jussi Pakkanen 79de463993 Converted precompiled headers into a base option. 2016-03-20 19:35:42 +02:00
Jussi Pakkanen 0c63f75aaf Converted coverage into a base option. 2016-03-20 19:16:49 +02:00
Jussi Pakkanen 0c9c29b6b6 Preserve b_ prefix for base option names. 2016-03-20 19:00:57 +02:00
Nirbheek Chauhan 57e01c2964 compilers: While linking, filter out libraries that are bundled with the MSVC runtime 2016-03-19 05:39:48 +05:30
Jussi Pakkanen ae1f284ade Added base options to Clang compilers. 2016-03-18 00:36:39 +02:00
Nirbheek Chauhan 64a0dc6269 Implement cc.find_library for the Visual Studio C/C++ compilers
Without this find_library always succeeds because MSVC just ignores -lfoo
as an invalid argument
2016-03-18 02:58:02 +05:30
Jussi Pakkanen 90c799fc61 Do not use lundef on OSX. 2016-03-17 22:52:55 +02:00
Jussi Pakkanen 8b6848ebc3 Add dir support for find_library and remove deprecated standalone version. Closes #450. 2016-03-17 20:55:19 +02:00
Jussi Pakkanen 19046fd854 Added new base options and some sample opts for gcc. 2016-03-16 21:55:03 +02:00
Jussi Pakkanen 9c5bda3f40 Return array by value so it does not get modified. 2016-03-12 17:32:43 +02:00
Jussi Pakkanen 6b548a1c75 Added find_library method and deprecated the standalone version. Closes #396. 2016-03-12 17:00:55 +02:00
Jussi Pakkanen c6138fe8bd .ipp is a C++ header suffix. 2016-02-26 22:52:36 +02:00
Nirbheek Chauhan d95a108503 compilers: MSVC does not understand the -lfoo syntax
MSVC requires import libraries called foo.lib for linking to foo.dll, so
translate -lfoo to that. If foo.lib doesn't exist, linking will fail as
expected.
2016-02-21 13:44:43 +02:00
Martin Ejdestig a179d07fd1 Do not pass -Weverything to Clang at warning level 3
-Weverything is not a good match for behavior of other compilers at warning
level 3. Align flags with what Meson passes to GCC instead.

The warnings generated are often conflicting with what the user most
probably wants. E.g.:

* -Wc++98-compat does not make sense when building code that uses -std= to
  set a later standard.

* -Wpadding warns when compiler pads classes and structs for better
  performance, probably something the user wants.

These warnings, and maybe a couple of others, can of course be disabled by
Meson with -Wno-* but it is not future proof (other warnings that makes
sense to disable by default may be added which means Meson will probably
have to pass different flags depending on the Clang version).

It is also problematic to compile many system and library headers with
-Weverything. For instance:

* stdio.h and sigaction.h on Linux makes use of recursive macros
  (-Wdisabled-macro-expansion).

* Many library headers make use of deprecated functionality (-Wdeprecated).

* Many library (e.g. GTK+ and Qt) headers trigger Clang's Doxygen warnings
  (-Wdocumentation-unknown-command and -Wdocumentation).

There are a couple of more warnings that need to be disabled when building
files that use GTK+ and Qt. GTest is also problematic.

Maybe it would make sense to add a higher level, where -Weverything would
be passed to Clang, that aligns with the original intent of -Weverything.
See http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20121029/067071.html .
GCC does not have a similar flag though. I do not know about other
compilers (MSVC etc).
2016-02-20 21:51:32 +01:00
Jussi Pakkanen 53e90acda9 Fix Vala cross compilation. Closes #370. 2016-02-17 22:15:32 +02:00
Nirbheek Chauhan deff35eef6 Filter out UNIX flags from external deps when using the MSVC compiler
This is very useful to prevent compiler noise about invalid cflags; particularly
for the -mms-bitfields cflag which most libraries send to the mingw-gcc
compiler. More can be added later.
2016-02-17 20:22:34 +02:00
Nirbheek Chauhan 3dd039487e compilers: /LD is not needed for PIC support in DLLs
On Windows, the advantages of PIC are provided by the runtime DLL loader. /LD is
also only valid as an argument to cl.exe, and the linker link.exe just barfs
when it sees it.

The code assumes that the compiler is the same as the linker which caused this
problem to occur.
2016-02-17 19:49:31 +02:00
Nirbheek Chauhan 3fcd056e86 compilers: Don't pass /D for debugoptimized build type
/D is the same as -D and stands for define not debug. Passing this would swallow
the next argument.
2016-02-17 14:28:19 +05:30
Jussi Pakkanen 819da091c2 Use deterministic mode in ar when it is available. 2016-02-12 23:42:20 +02:00
Jussi Pakkanen 6a3e29ccd4 If test exes can not be removed (because e.g. an antivirus program holds on to the file), just leave them behind. Closes #378. 2016-02-03 13:27:58 +11:00
Jussi Pakkanen 23b98cd6e6 Renamed meson package to mesonbuild so that we can have a script named meson in the same toplevel dir. 2016-01-16 17:35:29 +02:00