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

Fix clang unit tests #13546

Merged
merged 1 commit into from
Aug 17, 2021
Merged

Fix clang unit tests #13546

merged 1 commit into from
Aug 17, 2021

Conversation

dkjer
Copy link

@dkjer dkjer commented Jul 15, 2021

On Mac, clang errors out on some flags when attempting to run tests.

Description

On Mac, clang errors out on some flags when attempting to run tests:
clang: error: the clang compiler does not support '-funsigned-bitfields' [-Werror]
clang: error: optimization flag '-fno-inline-small-functions' is not supported [-Werror,-Wignored-optimization-argument]
clang: error: unsupported argument '-adhlns=.build/test_obj/eeprom_stm32/tmk_core/common/test/flash_stm32_mock.lst' to option 'Wa,'

Steps to reproduce:

  • On a system using clang, run make test:debounce_sym_defer_g

This change skips including a few non-compatible compiler flags when using clang.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added cli qmk cli command core dependencies documentation keyboard keymap python translation via Adds via keymap and/or updates keyboard for via support labels Jul 15, 2021
@dkjer dkjer changed the base branch from master to develop July 15, 2021 00:57
@github-actions github-actions bot removed cli qmk cli command keyboard dependencies python via Adds via keymap and/or updates keyboard for via support documentation keymap translation labels Jul 15, 2021
@drashna drashna requested a review from a team July 15, 2021 02:32
Copy link
Member

@zvecr zvecr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Continuing from #12567 (comment).

The main issue this is trying to solve is clangs limited gcc compatibility. clang can be run on more than systems that report as apple, likewise gcc can work fine on x86 darwin systems. There seems to still be little movement in providing a gcc for apple Arm64.

So would still be keen to pivot the issue from "is apple" to "is clang".

@zvecr zvecr requested a review from a team July 15, 2021 19:03
@dkjer dkjer force-pushed the fix-clang-unit-tests branch from 565712b to c1c91ac Compare July 18, 2021 01:51
@dkjer dkjer requested review from zvecr and removed request for a team July 18, 2021 01:54
@dkjer
Copy link
Author

dkjer commented Jul 18, 2021

@zvecr Ok, updated to check for clang

@drashna drashna requested a review from a team July 30, 2021 15:16
@tzarc tzarc merged commit 483691d into qmk:develop Aug 17, 2021
nhongooi pushed a commit to nhongooi/qmk_firmware that referenced this pull request Dec 5, 2021
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants