Skip to content

Replace small with std C lib if not supported by a target's toolchain #12691

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

Merged

Conversation

hugueskamba
Copy link
Collaborator

@hugueskamba hugueskamba commented Mar 24, 2020

Summary of changes

Display a post-build warning indicating to the user that the standard C
library was used instead of the small C library if the former is not
supported.

fixes #12585

Impact of changes

Targets that have specified to build with the small C lib can still be built with the standard C lib if the small C lib is not supported for a given toolchain. For example, as Mbed 2 targets typically specify the small C lib, they can still be built with the IAR toolchain (which does not have a small C lib) if the standard C lib is supported.

Migration actions required

N/A

Documentation


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Reviewers

@evedon @rajkan01 @mark-edgeworth @madchutney


@ciarmcom
Copy link
Member

@hugueskamba, thank you for your changes.
@mark-edgeworth @madchutney @rajkan01 @evedon @ARMmbed/mbed-os-tools @ARMmbed/mbed-os-maintainers please review.

Comment on lines 59 to 64
toolchain = "gcc_arm"

if is_std_c_lib_supported_instead_small_c_lib(target, toolchain):
# Replace small C lib with std if there is no small C lib support
target.c_lib = "std"

self.check_c_lib_supported(target, toolchain)
Copy link
Contributor

Choose a reason for hiding this comment

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

See above

@hugueskamba hugueskamba force-pushed the hk_replace_small_lib_with_std_lib branch from d072cb8 to 0e9c83e Compare March 25, 2020 12:43
@mergify mergify bot dismissed mark-edgeworth’s stale review March 25, 2020 12:43

Pull request has been modified.

@hugueskamba hugueskamba force-pushed the hk_replace_small_lib_with_std_lib branch from 0e9c83e to 12704f8 Compare March 25, 2020 14:05
@mergify mergify bot dismissed mark-edgeworth’s stale review March 25, 2020 14:05

Pull request has been modified.

Copy link
Contributor

@mark-edgeworth mark-edgeworth left a comment

Choose a reason for hiding this comment

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

Sorry for being picky on this, but I'm keen that we make the code that we add better than that which already exists. This codebase is pretty bad generally: anything we can do to improve matters helps a great deal!

mark-edgeworth
mark-edgeworth previously approved these changes Mar 25, 2020
@mergify mergify bot dismissed mark-edgeworth’s stale review March 25, 2020 14:30

Pull request has been modified.

"""
Check if a library type is supported by a toolchain for a given target.

Return True if the library type is supported, False if not supported, and
Copy link
Contributor

Choose a reason for hiding this comment

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

missing something here....

Copy link
Collaborator Author

@hugueskamba hugueskamba Mar 25, 2020

Choose a reason for hiding this comment

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

@mergify mergify bot dismissed mark-edgeworth’s stale review March 25, 2020 14:40

Pull request has been modified.

@hugueskamba hugueskamba force-pushed the hk_replace_small_lib_with_std_lib branch 2 times, most recently from 28d8665 to 7d57bdf Compare March 25, 2020 14:51
@hugueskamba
Copy link
Collaborator Author

This force-push squashes all commits.

mark-edgeworth
mark-edgeworth previously approved these changes Mar 25, 2020
evedon
evedon previously approved these changes Mar 25, 2020
Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

Looks great!

@evedon
Copy link
Contributor

evedon commented Mar 31, 2020

The travis events issue was fixed in https://github.com/ARMmbed/mbed-os/pull/12629/files

Display a post-build warning indicating to the user that the standard C
library was used instead of the small C library if the former is not
supported.
@hugueskamba hugueskamba force-pushed the hk_replace_small_lib_with_std_lib branch from 7d57bdf to 0e5b71f Compare March 31, 2020 10:37
@mergify mergify bot dismissed stale reviews from mark-edgeworth and evedon March 31, 2020 10:37

Pull request has been modified.

@hugueskamba
Copy link
Collaborator Author

This force-push rebased from master to ensure the travis events issue is fixed.

@evedon
Copy link
Contributor

evedon commented Apr 1, 2020

Travis events issue is fixed. Let's start CI next.

Copy link
Contributor

@evedon evedon left a comment

Choose a reason for hiding this comment

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

Re-reviewed.

@mergify mergify bot added needs: CI and removed needs: work labels Apr 2, 2020
@adbridge
Copy link
Contributor

adbridge commented Apr 2, 2020

CI started, I'm assuming CI on master is working again ....

@mbed-ci
Copy link

mbed-ci commented Apr 2, 2020

Test run: FAILED

Summary: 1 of 6 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 3, 2020

Known issue, will be restarted

@evedon
Copy link
Contributor

evedon commented Apr 6, 2020

Known issue, will be restarted

Has the CI issue been fixed?

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 6, 2020

No, still fails for most of PRs, multiple issues being looked at by @ARMmbed/mbed-os-test team

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 9, 2020

Started CI

@mbed-ci
Copy link

mbed-ci commented Apr 9, 2020

Test run: FAILED

Summary: 2 of 3 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 9, 2020

restarted CI

@mbed-ci
Copy link

mbed-ci commented Apr 9, 2020

Test run: FAILED

Summary: 2 of 3 test jobs failed
Build number : 4
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 14, 2020

CI restarted

@mbed-ci
Copy link

mbed-ci commented Apr 14, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 5
Build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

baremetal test profile doesn't allow IAR compilation
7 participants