Commit Graph

91 Commits

Author SHA1 Message Date
Oskar Sigvardsson 1d443f1bc6 Fixed using files object in subdir with xcode backend
Fixes bug #589. When generating string from file object, it didn't take subdir
into account.
2020-10-04 14:52:28 +02:00
Daniel Mensinger 668610c0d2 backend: refactor: set self.interpreter in the constructor 2020-01-28 21:18:25 +02:00
Michael Hirsch, Ph.D ecaba8c234 xcode 64 bit for catalina [skip ci] 2019-10-18 01:07:52 +03:00
Dylan Baker 866d105036 xcodebackend: Fix iterating compilers after host/build changes
Fixes #5570
2019-06-30 00:29:39 +03:00
John Ericson 07777e15d4 Purge `is_cross` and friends without changing user interfaces
In most cases instead pass `for_machine`, the name of the relevant
machines (what compilers target, what targets run on, etc). This allows
us to use the cross code path in the native case, deduplicating the
code.

As one can see, environment got bigger as more information is kept
structured there, while ninjabackend got a smaller. Overall a few amount
of lines were added, but the hope is what's added is a lot simpler than
what's removed.
2019-06-09 13:13:25 -04:00
Daniel Mensinger 236221061a
Fixed unnecessary .items() 2019-04-29 12:23:13 +02:00
Daniel Mensinger 3581839f4c
Fix unused variables warnings 2019-04-29 12:22:50 +02:00
Dylan Baker 5678468c2c Don't use len() to test for container emptiness
I ran the numbers once before (it's in the meson history) but it's
*much* faster to *not* use len for testing if a container is empty or
not.
2019-04-25 12:28:51 -07:00
David Vanderson 5b53335724 xcode backend: Add target dependency link args 2019-02-24 23:47:58 +02:00
Guillermo Ignacio Enriquez Gutierrez fd86b0c619 Pass arguments from in xcode projects 2018-10-08 21:31:15 +03:00
Guillermo Ignacio Enriquez Gutierrez 47edf72cad Xcode project now supports assembly files 2018-10-08 21:31:15 +03:00
Guillermo Ignacio Enriquez Gutierrez aff3930464 Fix Xcode backend: Add build dir to SYSTEM_HEADER_SEARCH_PATHS so generated headers can be included/imported in sources 2018-10-01 19:22:52 +09:00
Guillermo Ignacio Enriquez Gutierrez 6f4ba8b2f4 Fix Xcode backend: support for precompiled headers. Only one header per target is supported 2018-09-25 01:11:46 +09:00
Guillermo Ignacio Enriquez Gutierrez 9b7bb4aa92 Partially fix targets that use precompiled header with --backend=xcode. Various compiled headers are not working yet [skip ci] 2018-09-24 02:17:57 +09:00
Guillermo Ignacio Enriquez Gutierrez f482b82a43 Sort some objects before writing as Xcode expects [skip ci] 2018-09-24 02:17:47 +09:00
Guillermo Ignacio Enriquez Gutierrez 05d1577e87 Fix `build --backend=xcode` (#4220)
* Fix exception when running

* Fix xcode project typos, indentation and other minor aesthetics diffs

* Use tab code \t instead of real tab
2018-09-19 08:05:24 -07:00
Jukka Laurila 1d0169f4e7 Fix shared library building on xcode. 2018-03-12 23:05:07 +02:00
Jukka Laurila 58ce5fe62d Fix xcode backend to run "meson test" instead of the nonexistent meson_test.py. 2018-03-09 00:26:14 +02:00
Jon Turney cd5dba5358 Fix flake8 'imported but unused' reports
$ flake8 | grep F401
./meson.py:17:1: F401 'mesonbuild.mesonlib' imported but unused
./meson.py:18:1: F401 'locale' imported but unused
./run_unittests.py:24:1: F401 'sys' imported but unused
./mesonbuild/minit.py:2:1: F401 'pyclbr.Function' imported but unused
./mesonbuild/minit.py:18:1: F401 'os' imported but unused
./mesonbuild/backend/vs2010backend.py:15:1: F401 'sys' imported but unused
./mesonbuild/backend/xcodebackend.py:19:1: F401 'sys' imported but unused
./mesonbuild/dependencies/ui.py:20:1: F401 'shutil' imported but unused
./mesonbuild/modules/python3.py:15:1: F401 'sys' imported but unused
./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..compilers' imported but unused
./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..mlog' imported but unused
./test cases/common/98 gen extra/srcgen3.py:3:1: F401 'os' imported but unused
2018-03-03 21:06:45 +00:00
Aleksey Filippov 2cf85ae16f Use os.path: basename() and dirname() instead of split()
According to Python documentation[1] dirname and basename
are defined as follows:
    os.path.dirname() = os.path.split()[0]
    os.path.basename() = os.path.split()[1]
For the purpose of better readability split() is replaced
by appropriate function if only one part of returned tuple
is used.

[1]: https://docs.python.org/3/library/os.path.html#os.path.split
2018-01-30 07:08:22 +11:00
Jussi Pakkanen 22adda1617 Review fixes. 2017-11-21 23:29:06 +02:00
Jussi Pakkanen 5d51bc79c7 Replaced sys.executable use with the mesonlib equivalent. 2017-11-20 23:08:17 +02:00
Jussi Pakkanen 5cec8fc43a Removed consecutive identical variable assignments. 2017-07-16 12:04:24 +03:00
Alistair Thomas a195b78c8d Whitespace tweaks to reduce Flake8 warnings 2017-05-29 19:32:47 +03:00
blackbox db176c85db xcode-backend framework fixes
- frameworks-per-target ( each needs its own uid )
2017-05-23 12:54:33 +02:00
blackbox dd443ad0eb codestyle 2017-05-23 12:54:33 +02:00
blackbox 03ebe2f56f remove debug-marker 2017-05-23 12:54:33 +02:00
blackbox ea5eb2a80d XCode frameworks support
- supported as "Link with Libraries".
- Frameworks added as a group to the project
- no need to specify custom linker flags anymore, xcodeproj works just like ninja

example mason.build file :
dep_main += [dependency('appleframeworks', modules : ['Foundation', 'AppKit', 'IOKIT', 'QuartzCore', 'OpenGL', 'GLUT', 'OpenAL'], required : true)]
2017-05-23 12:54:33 +02:00
Peter Hutterer a576791064 Use American English - 'ise' -> 'ize' where applicable 2017-05-04 22:09:27 +03:00
Mike Sinkovsky e9a891fe25 style: [E502] the backslash is redundant between brackets 2017-01-11 12:33:27 -05:00
Igor Gnatenko 969dc7e995 style: fix E124 violations
E124: closing bracket does not match visual indentation

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko 2017d8578a style: fix E226 violations
E226: missing whitespace around arithmetic operator

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Igor Gnatenko f0b30baa39 style: fix E225 violations
E225: missing whitespace around operator

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01 12:02:05 -05:00
Jussi Pakkanen b55235dfbd Fix space before :. 2016-12-31 16:28:15 +02:00
Jussi Pakkanen dc1f537fb3 Skip shared module test on VS because it fails for some reason nobody understands. 2016-12-07 00:30:28 +02: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 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
Nirbheek Chauhan 86aa51232e backends: Don't duplicate test setup data file name
Instead, return the values of the test and benchmark setup data files so
that the ninja/osx/vs backends can use those filenames instead of
hard-coding them.
2016-04-15 05:49:42 +05:30
Hemmo Nieminen 336904b553 Move MesonException from coredata to mesonlib. 2016-04-01 00:52:45 +03:00
Rogiel Sulzbach f98dc48a8d Fix Xcode backend
This makes the following changes:
 * Explicitly closes the file for force flushing (this fixes an issue on which the last 2 or 3 lines weren't being written to disk)
 * Adds another check on the PBXBuildFile stage to get the file name if the returned source type is a File instead of a string

Fixes issue #337
2016-02-25 18:32:26 -03:00
Jussi Pakkanen 7435df8399 Moved backends to their own module. 2016-01-23 20:02:52 +02:00