Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ARMCLANG compiler support for C/C++ #3717

Merged
merged 3 commits into from
Jun 20, 2018
Merged

Added ARMCLANG compiler support for C/C++ #3717

merged 3 commits into from
Jun 20, 2018

Conversation

sompen
Copy link
Contributor

@sompen sompen commented Jun 8, 2018

  • The changes include support for cross-compiling C and C++ code with ARMCLANG.
  • 'armlink' is used as linker internally, so the path to armlink should be set in the user environment PATH variable before running meson.
  • Building shareable libraries is not supported with current implementation.
  • The PIC support related options are expected to be added by user explicitly.
  • The current implementation doesn't have support for compiling assembly files with arm syntax and only supports gnu syntax.
  • The 'target' compiler command line option is required to be set for running the sanity check, so passing this option from cross-file, cross/armclang.txt.
    The changes tested on Windows with ARM compiler version 6.5(MDK 5.21).
    The attached files are the cross test results obtained from running the following command line
    python .\run_cross_test.py cross\armclang.txt
    armclang_cross_test_log.txt
    meson-cross-test-run.txt
    meson-cross-test-run.xml

Currently 46 tests are failing, 4 are being skipped and 151 tests are passing.

@jpakkane
Copy link
Member

Building shareable libraries is not supported with current implementation.

Is this a limitation of the toolchain or of this code? This should be explicitly mentioned in the documentation at least to avoid confusing people.

@sompen
Copy link
Contributor Author

sompen commented Jun 11, 2018

@jpakkane,

Is this a limitation of the toolchain or of this code? This should be explicitly mentioned in the documentation at least to avoid confusing people.

The ARMCLANG toolchain supports shared libraries but the current implementation by us for the ARMCLANG compiler support in Meson doesn't include the required set of compiler options for building a shared library.

@jpakkane
Copy link
Member

The documentation should say why they are not supported rather than just that they won't work.

@sompen
Copy link
Contributor Author

sompen commented Jun 20, 2018

@jpakkane I have updated the documentation. Can you please verify it once?

@jpakkane
Copy link
Member

It would be nice if the documentation said what needs to be done to get the shared library support working so interested contributors can get it working. But that can be put in a different PR. Merging this now. Thanks.

@jpakkane jpakkane merged commit 7140afc into mesonbuild:master Jun 20, 2018
jon-turney added a commit to jon-turney/meson that referenced this pull request Jul 4, 2018
$ flake8 | grep F401
./mesonbuild/compilers/__init__.py:128:1: F401 '.c.ArmclangCCompiler' imported but unused
./mesonbuild/compilers/__init__.py:138:1: F401 '.cpp.ArmclangCPPCompiler' imported but unused
./mesonbuild/modules/__init__.py:4:1: F401 '..mlog' imported but unused

PR mesonbuild#3717 imports ARMCLANG compilers in __init__, but does not add them to
__all__, so they are not re-exported by the compilers package like
everything else.
nirbheek pushed a commit that referenced this pull request Jul 5, 2018
* Fix flake8 whitespace reports

$ flake8 | grep -E '(E203|E221|E226|E303|W291|W293)'
./mesonbuild/coredata.py:337:5: E303 too many blank lines (2)

* Fix flake8 'variable assigned value but unused' reports

$ flake8 | grep -E F841
./mesonbuild/modules/gnome.py:922:9: F841 local variable 'target_name' is assigned to but never used

* Fix flake8 'imported but unused' reports

$ flake8 | grep F401
./mesonbuild/compilers/__init__.py:128:1: F401 '.c.ArmclangCCompiler' imported but unused
./mesonbuild/compilers/__init__.py:138:1: F401 '.cpp.ArmclangCPPCompiler' imported but unused
./mesonbuild/modules/__init__.py:4:1: F401 '..mlog' imported but unused

PR #3717 imports ARMCLANG compilers in __init__, but does not add them to
__all__, so they are not re-exported by the compilers package like
everything else.

* More details about flake8 in Contributing.md

Mention that Sider runs flake8
Suggest seting flake8 as a pre-commit hook
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants