Commit Graph

66 Commits

Author SHA1 Message Date
Xiaotian Wu 233afde4cc add loongarch support 2021-02-06 15:16:04 +00:00
Jussi Pakkanen 474f4813c4 Capitalize "Meson" consistently as it is a proper name. [skip ci] 2021-01-31 19:49:20 +00:00
Jussi Pakkanen f72ee8e742 Rewrap long text lines in docs. [skip ci] 2021-01-30 16:19:59 +00:00
Sebastian Meyer a24fde6fde
Add support for the CompCert C Compiler
* Add preliminary support for the CompCert C Compiler

The intention is to use this with the picolibc, so some GCC flags are
automatically filtered. Since CompCert uses GCC is for linking, those
GCC-linker flags which are used by picolibc, are automatically prefixed
with '-WUl', so that they're passed to GCC.

Squashed commit of the following:

commit 4e0ad66dca9de301d2e41e74aea4142afbd1da7d
Author: Sebastian Meyer <meyer@absint.com>
Date:   Mon Aug 31 14:20:39 2020 +0200

    remove '-fall' from default arguments, also filter -ftls-model=.*

commit 41afa3ccc62ae72824eb319cb8b34b7e6693cb67
Author: Sebastian Meyer <meyer@absint.com>
Date:   Mon Aug 31 14:13:55 2020 +0200

    use regex for filtering ccomp args

commit d68d242d0ad22f8bf53923ce849da9b86b696a75
Author: Sebastian Meyer <meyer@absint.com>
Date:   Mon Aug 31 13:54:36 2020 +0200

    filter some gcc arguments

commit 982a01756266bddbbd211c54e8dbfa2f43dec38f
Author: Sebastian Meyer <meyer@absint.com>
Date:   Fri Aug 28 15:03:14 2020 +0200

    fix ccomp meson configuration

commit dce0bea00b1caa094b1ed0c6c77cf6c12f0f58d9
Author: Sebastian Meyer <meyer@absint.com>
Date:   Thu Aug 27 13:02:19 2020 +0200

    add CompCert to meson (does not fully work, yet)

* remove unused import and s/cls/self/

fixes the two obvious LGTM warnings

* CompCert: Do not ignore unsupported GCC flags

Some are safe to ignore, however, as per
https://github.com/mesonbuild/meson/pull/7674, they should not be
ignored by meson itself. Instead the meson.build should take care to
select only those which are actually supported by the compiler.

* remove unused variable

* Only add arguments once.

* Apply suggestions from code review

Co-authored-by: Dylan Baker <dylan@pnwbakers.com>

* Remove erroneous ' ' from '-o {}'.format()

As noticed by @dcbaker

* added release note snippet for compcert

* properly split parameters

As suggested by @dcbaker, these parameters should be properly split into multiple strings.

Co-authored-by: Dylan Baker <dylan@pnwbakers.com>

* Update add_compcert_compiler.md

Added a sentence about the state of the implementation (experimental); use proper markdown

* properly separate arguments

Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2020-09-15 21:51:21 +03:00
Michael Hirsch, Ph.D 0c5f3c7483
doc 2020-07-13 00:20:53 -04:00
Tim-Philipp Müller 246e5437aa compiler: add 'force_align_arg_pointer' function attribute 2020-06-21 23:34:11 +03:00
Dylan Baker b384f82b9a envconfig: Add support SuperH SH-4
Fixes: #7358
2020-06-19 10:56:09 -07:00
Dylan Baker 348b0ef671 docs: Alphabetically sort the cpu_family reference table
It's close, but not quite. This should make it easier to read
2020-06-19 10:54:18 -07:00
John Ericson 58c2aeb5e4 [skip ci] docs: Bring up to date on options per machine
I tried to fix the docs when the stuff was added, but it turns out I
missed things, as noted in
https://github.com/mesonbuild/meson/issues/7284#issuecomment-641641177
2020-06-12 10:35:11 -07:00
Jussi Pakkanen f818d961e4 Add android to os list informally. Closes #6233. [skip ci] 2020-06-04 00:42:09 +03:00
Jussi Pakkanen 630a003746 Add AVR to cpu families. Closes #7085. 2020-05-11 14:56:56 -07:00
Vanadiae eb806b7286 References-tables.md: repair broken table
At https://mesonbuild.com/Reference-tables.html#compiler-and-linker-selection-variables, the table is broken and it seems that the only difference with other well-working tables on this page is the semi-column ":" that are present under Language.
2020-04-11 19:23:00 +02:00
alanNz 7460292810 -Add xc16 and c2000 C,Cpp toolchain support 2020-03-21 00:47:24 +02:00
Dylan Baker 6a5fdbf995 docs: Add Environment variables for compiler/linker selection
We really should be documenting these in an easy to find and reference
place.
2020-03-17 10:40:39 -07:00
Dylan Baker 654f427759 compilers/linkers: Add a representation for wasm-ld
Emscripten does have a stand alone linker, wasm-ld. This patch adds the
linker, adds detection for the linker, and removes the IsLinkerMixin for
emscripten. This is a little more correct, and makes the code a lot
cleaner and more robust.
2020-02-27 16:35:02 -08:00
Dylan Baker 48f3e72493 linkers: Update the linker names to be more consistent
This makes two basic changes, 1 it moves the name of the linker into the
linker class, this should reduce the number of errors and typos, and
ensure that a linker always has one name. This then renames the linkers
to have more consistent names.

Posix/gnu linkers are called ld.<name>: ld.gold, ld.lld, ld.solaris.

Apple linkers are renamed ld64.
2020-02-21 05:15:25 +05:30
Dylan Baker 9e7cca1472 docs: Fix reference table for linker names
These are pretty much all over the place because I never intended them
to be exposed to the meson source language, they were meant just for
documentation.
2020-02-21 05:15:25 +05:30
Dylan Baker 8c1221b437 Add m68k to known cpus for Motorola 68000 series processors
Fixes #6492
2020-01-23 00:20:01 +02:00
Niklas Hambüchen b44501b02d docs: Fix typo in link
Commit 1404f404 (#4744) introduced this typo, making the link not jump to the correct section when clicked.
2020-01-21 08:46:33 -08:00
Dylan Baker 3b691a89bd Add s390 to list of known architectures
Fixes #6411
2020-01-15 09:56:13 -08:00
Michael Hirsch, Ph.D 5695dc0f16 add compiler.get_linker_id() method
this can be useful for if/elif where linker behaviors must be
considered.

For example, clang with "link" vs gcc with "ld.bfd" etc.

ci for compiler.get_linker_id() method

doc

add @FeatureNew check

Co-Authored-By: Daniel Mensinger <daniel@mensinger-ka.de>
2019-12-19 12:03:55 -05:00
yshui 51d0e02292 Add missing openbsd to the operating system names table [skip ci] 2019-11-11 22:41:09 +02:00
Matt Turner 20519a0e1a envconfig: Add Alpha CPU family 2019-10-15 21:47:58 +03:00
Nathan Rossi 2dd5e695c7 envconfig: Add MicroBlaze CPU family
Add the CPU family for the MicroBlaze processor.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
2019-09-26 20:28:42 +03:00
Dylan Baker 523c393691 docs: Add sunos to the reference table
I originally liked "solaris", but I've changed my mind. Both illumos
(the open-source fork of OpenSolaris) and Oracle's closed-source
Solaris are identified by the same token, and there are differences
between them; so using "sunos" as a sort "supertype" for both makes
sense to me.
2019-09-09 21:22:26 -07:00
Jussi Pakkanen f41bdae368 Add basic Webassembly support via Emscripten. 2019-08-05 19:31:32 +03:00
Dylan Baker e2039da5d9 Split attribute visibility
* c_function_attributes: remove 'protected' from 'visibility'

This doesn't exist on macos with the apple compiler, which always causes
failures.

Fixes #5530

* compilers: Add split visibility checks to has_function_attribute

These check for a single visibility at a time, rather than all four at
once. This allows for finer grained searches, and should make using
these checks safer across operating systems.
2019-06-25 00:02:26 +03:00
Dylan Baker be88945ee3 docs/reference-table: Add intel-cl
Because the Intel compiler behaves significantly differently on windows
than it does on Linux and MacOS I've decided it would be better to
follow the clang/clang-cl split and make id "intel-cl" on windows
(leaving "intel" alone on Linux and Mac). Since we've never supported
ICL and it hasn't worked in the past I think this is an okay change to
make.
2019-05-13 11:22:31 -07:00
Jussi Pakkanen 81f0eef2df Add table for dependency method types. [skip ci] 2019-03-04 11:25:50 +02:00
Michael Hirsch, Ph.D 72486afd08 Add PGI C and C++ compilers (#4803) 2019-01-21 20:09:36 +02:00
Michael Hirsch, Ph.D b40c1af900
Flang Fortran compiler added. 2019-01-16 17:06:43 -05:00
Dylan Baker c1b01d54c2 docs: Add link args to the table of language args [skip ci] 2019-01-08 11:40:25 -08:00
Dylan Baker 1404f404f8 docs: document that using environment variables is discouraged [skip ci] 2019-01-08 11:40:25 -08:00
lzutao c208e81e1a Format Compiler and linker flag table [skip ci] 2018-12-13 11:22:02 -05:00
Jussi Pakkanen 131459bd05 Add Renesas RL78 CPU family. Closes #4606. 2018-12-11 20:56:35 +02:00
Floris Bruynooghe e629a4ad1d [skip ci] Document CFLAGS and friends in main docs
Currently this is only partially documented in the quick-start guide,
include this in the main docs and document all the environment
argumens used.
2018-11-22 22:31:19 +02:00
Jon Turney 8b88fb990e docs: Alphabetically sort reference table rows [skip ci] 2018-11-22 22:28:21 +02:00
Jon Turney e72a2b2260 docs: Add clang-cl to reference table for compiler get_id() values [skip ci] 2018-11-22 22:28:21 +02:00
Phillip Cao 68c83cb213 Add support for Renesas CC-RX toolchain 2018-11-08 00:02:22 +13:00
Dylan Baker 63f4f9481e Add new compiler.get_argument_syntax method
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-03 18:10:36 +02:00
Nirbheek Chauhan 1c2cfe4529 docs: Fix gcc attribute list link [skip ci] 2018-10-27 23:11:44 +01:00
Dylan Baker e9ba04537f Add gnu hurd to *_machine information 2018-10-10 19:42:51 +03:00
Dylan Baker 829d7bf6f9 docs: Add note to cpu_family table about endianess [skip ci]
Autotools will add endianess to the name of the architecture in some
cases (such as ppc64le vs ppc64) meson doesn't do this. It's worth
noting this in the documentation.
2018-10-02 21:08:24 +03:00
Alexey Brodkin 9453ac6182 mesonbuild: Recognise ARC architecture
-------------------------->8-----------------------
root@nsimhs:~# python

Python 2.7.15 (default, Sep 20 2018, 21:44:15)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import platform
>>> print platform.machine()
arc
-------------------------->8-----------------------

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-09-23 11:22:38 +03:00
Dylan Baker 51e9db370a Add method to check for C/C++ function attributes
It's fairly common on Linux and *BSD platforms to check for these
attributes existence, so it makes sense to me to have this checking
build into meson itself. Autotools also has a builtin for handling
these, and by building them in we can short circuit cases that we know
that these don't exist (MSVC).

Additionally this adds support for two common MSVC __declspec
attributes, dllimport and dllexport. This implements the declspec
version (even though GCC has an __attribute__ version that both it and
clang support), since GCC and Clang support the MSVC version as well.
Thus it seems reasonable to assume that most projects will use the
__declspec version over teh __attribute__ version.
2018-09-07 11:52:15 -07:00
Jussi Pakkanen fb770e1e3d Add support for custom dist scripts. 2018-08-27 23:35:29 +03:00
Jussi Pakkanen 1b2f8acbeb Add support for s390x CPUs. Closes #3897. 2018-08-11 04:21:55 -07:00
Jussi Pakkanen ecf4024592 Add 32 bit sparc processor support. Closes #3901. 2018-08-03 00:27:33 +03:00
Khem Raj 6fafbad6d5 mesonbuild: Recognise risc-v architecture
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-07-21 22:02:25 +03:00
Ross Burton e3e2e4ca14 Canonicalise 64-bit PowerPC CPU families to "ppc64"
Instead of exposing the endianness in the CPU family, canonicalise the CPU
family to just "ppc64" to match MIPS (which is also bi-endian).

Part of the work for #3842.
2018-07-07 11:47:42 +03:00