Commit Graph

83 Commits

Author SHA1 Message Date
Jussi Pakkanen af53c2bc3b Merge pull request #419 from nioncode/fixVs2010Regen
Fix vs2010 regen
2016-02-26 21:50:22 +02:00
Jussi Pakkanen ea60a22cd5 Merge Python 3 module support. 2016-02-26 21:21:53 +02:00
Nicolas Schneider 40a7287a59 vs2010: properly check whether solution needs to be regenerated 2016-02-25 23:13:29 +01:00
Nicolas Schneider ac5ee0c414 dump coredata to file before calling backend.generate()
This ensures that all build files always have a later timestamp than
coredata.dat, which is used to check if the build files must be
regenerated.
2016-02-25 23:13:29 +01:00
Nicolas Schneider bffc84e77e vs2010: write regen.rule in gen_regenproj 2016-02-25 23:13:14 +01:00
Nicolas Schneider 4651ec8f77 vs2010: fix REGEN project input files 2016-02-25 23:12:56 +01:00
Jussi Pakkanen 003696fc27 Merge VS2010 path fix branch. 2016-02-25 22:49:44 +02:00
Nicolas Schneider c5001a3a5a call os.path.normpath before splitting a file path into its components
This makes sure that any '/' are converted to native directory separators
on Windows.
2016-02-25 21:36:57 +01:00
Jussi Pakkanen 6f907dd4ab Merge pull request #358 from tp-m/no-args
Try harder to infer build and source directories if called without arguments.
2016-02-24 22:45:14 +02:00
Jussi Pakkanen 7d516ee9b1 Merge pull request #408 from nioncode/fixGeneratorTest
Fix generator test
2016-02-24 21:02:47 +02:00
Minijackson 3b688c6114 Create directories of unity temporary files 2016-02-24 15:07:43 +01:00
Nicolas Schneider 6de2fd6ab5 vs2010: fix target_to_build_root method
Python's os.path.split() does not split the path into its components.
Instead, split the path with str.split() using the OS's file system
separator.
2016-02-24 00:40:14 +01:00
Nicolas Schneider 78551ae242 vs2010: do not add generated object files to project
MSBuild automatically includes the output objects of the CustomBuildStep
in the link command. If the objects are additionally added to the project,
they will be put twice on the linker command, which leads to LNK4042
warning.
2016-02-23 23:46:34 +01:00
Nicolas Schneider 2dcac38624 vs2010: write CustomBuildStep only if there is at least 1 command to be run 2016-02-23 22:55:13 +01:00
Nicolas Schneider ed6c0e1fa6 vs2010: merge all generators into single command invocation
MSBuild does not allow multiple CustomBuildStep elements. Therefore, all
input / output files and generator commands must be concatenated and put
into a single CustomBuildStep.
2016-02-23 01:04:27 +01:00
Nicolas Schneider d79f402769 vs2010: fix including a precompiled / generated object file in compilation
MSBuild uses the <Object Include='FILE'/> syntax to add prebuilt object
files to the project.
2016-02-23 01:04:27 +01:00
Nicolas Schneider c2e406295e vs2010: fix wrong generator command concatenation 2016-02-23 01:03:52 +01:00
Jussi Pakkanen d88223bd61 Do delayed argument setting properly this time. 2016-02-22 21:28:34 +02:00
Martin Ejdestig 6a90d5d587 Print value of werror in mesonconf 2016-02-22 19:45:34 +01:00
Martin Ejdestig 47db4e3d53 Pass warning arguments to compiler even if buildtype is plain
Noticed when trying to pass custom optimization flags, and hence setting
buildtype to plain, that warnings for different levels were not passed to
compiler.

This was a bit confusing since mesonconf still displayed "warning_level=3"
and -Werror was passed correctly due to "werror=true". So this change
aligns warning_level behavior with werror. That is, heed what is in
project() in meson.build but user can still override if necessary.
2016-02-22 18:57:07 +01:00
Jussi Pakkanen 836b121a9c Refix Linux. 2016-02-22 00:09:06 +02:00
Jussi Pakkanen a04c33e125 Can build Python extension on OSX. 2016-02-21 17:12:09 +02:00
Jussi Pakkanen 98d3fb5372 Extract python3 dependency information from the current process if it is not available in pkg-config. 2016-02-21 14:53:36 +02:00
Jussi Pakkanen 98d00386b1 Can build a Python extension module. 2016-02-21 14: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
Jussi Pakkanen 560d9d7375 Merge pull request #398 from nirbheek/target-link-implib
Re-introduce patch to fix linking with MSVC by linking with import library.
2016-02-21 13:25:51 +02:00
Jussi Pakkanen 0469128f46 Preserve 'C:\' as an absolute path in prefix. 2016-02-21 13:14:25 +02:00
Jussi Pakkanen f74d6201eb Guard against ALL THE THINGS! 2016-02-21 13:04:31 +02:00
Jussi Pakkanen 9463c5965e Swallow stderr of helper process invocation because nobody needs to see it and it causes problems in Debian testing framework. 2016-02-21 12:58:59 +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 2cbe876f71 Merge pull request #388 from nirbheek/extprog.path
Add path() method to ExternalProgramHolder types
2016-02-20 14:33:42 +02:00
Nirbheek Chauhan a15e784851 meson_install: os.symlink may be implemented and still not work
Requires Administrator access by default to work
2016-02-20 14:28:28 +02:00
Jussi Pakkanen 3abd5305c2 Default to cwd in mesonconf. Closes #400. 2016-02-20 00:02:44 +02:00
Nirbheek Chauhan 21d471673a environment: When using MinGW-GCC, the import lib suffix is dll 2016-02-20 02:17:57 +05:30
Nirbheek Chauhan 81544feffe Explicitly use the import library while generating link args for a target 2016-02-20 02:17:51 +05:30
Jussi Pakkanen 091b782e43 Prevent state leaks when running tests in-process. 2016-02-17 23:27:18 +02:00
Jussi Pakkanen 25e39f7fb1 A few win fixes. 2016-02-17 23:22:25 +02:00
Jussi Pakkanen aaf6075c89 Reverted implib patch as it broke mingw completely. 2016-02-17 23:09:39 +02: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 440d73902d Explicitly use the import library while generating link args for a target 2016-02-17 20:13:24 +02:00
Nirbheek Chauhan e31b6e4a7b ninjabackend: Try symlinking and ignore if it doesn't work
Instead of checking if we're on Windows and not even trying, try to symlink and
if that fails due to insufficient privileges, then just continue. This allows
people who know what they're doing to allow users other than Administrators to
make symlinks on Windows, or allows them to just run Meson as an Administrator.
2016-02-17 20:01:31 +02:00
Jussi Pakkanen 31fc897496 Merge pull request #391 from nirbheek/minor-changes
Bunch of minor changes
2016-02-17 19:58:39 +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 8bd0f432a0 backends: Clarify the reason behind a grotesque hack 2016-02-17 15:03:54 +05:30
Nirbheek Chauhan a901024d33 When erroring out due to invalid prefix, print the value
Helps with debugging what's going wrong
2016-02-17 15:03:54 +05:30
Nirbheek Chauhan 601ff91622 interpreter: Add path() method to ExternalProgramHolder types
In practice, this means we can do

 flex = find_program('flex')
 flex.path() # Gives the full path to the flex binary
2016-02-17 14:45:50 +05:30
Nirbheek Chauhan 36c9a165ed build.CustomTarget: Also accept mesonlib.File types as 'command' arguments 2016-02-17 14:45:50 +05:30
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 edd61dcf81 When killing a frozen process, take all its children with it. Closes #377. 2016-02-14 22:11:48 +02:00