Skip to content

tools: Support default_lib and c_lib #13007

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
merged 2 commits into from
May 27, 2020

Conversation

Patater
Copy link
Contributor

@Patater Patater commented May 22, 2020

Summary of changes

For backwards compatibility reasons, since the latest Mbed OS tools must be able to build any previous online-compiler-supported version of Mbed OS, allow targets to use default_lib or c_lib. This should enable the tools to work with Mbed OS 5 style targets.json.

Impact of changes

None

Migration actions required

None

Documentation

None


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)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@Patater Patater changed the title Default lib c compat tools: Support default_lib and c_lib May 22, 2020
@Patater Patater requested a review from mark-edgeworth May 22, 2020 14:07
@ciarmcom ciarmcom requested review from a team May 22, 2020 15:00
@ciarmcom
Copy link
Member

@Patater, thank you for your changes.
@ARMmbed/mbed-os-tools @ARMmbed/mbed-os-maintainers please review.

0xc0170
0xc0170 previously approved these changes May 25, 2020
@0xc0170 0xc0170 requested a review from a team May 25, 2020 11:39
@mergify mergify bot added needs: CI and removed needs: review labels May 25, 2020
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.

May need extra work to check out the code that handles default_lib.

"target.default_lib is no longer supported, please use target.c_lib for C library selection."
)
if hasattr(target, "c_lib"):
if hasattr(target, "default_lib") or hasattr(target, "c_lib"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this allows default_lib to be specified without failing, but the code doesn't appear to do anything with this attribute here. I don't know whether the code handling default_lib has been removed, or that it still exists somewhere in the codebase and remains unaltered. Needs checking...

Copy link
Contributor Author

@Patater Patater May 26, 2020

Choose a reason for hiding this comment

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

Yes, this obviously won't work as intended. Reworked.

@@ -652,7 +652,7 @@ def is_not_supported_error(self, output):

@abstractmethod
def parse_output(self, output):
"""Take in compiler output and extract sinlge line warnings and errors from it.
"""Take in compiler output and extract single line warnings and errors from it.
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch

For backwards compatibility reasons, since the latest Mbed OS tools must
be able to build any previous online-compiler-supported version of Mbed
OS, allow targets to use `default_lib` or `c_lib`. This should enable
the tools to work with Mbed OS 5 style targets.json.
@Patater Patater force-pushed the default-lib-c-compat branch from 6da8b29 to 5e65cf7 Compare May 26, 2020 09:48
@mergify mergify bot dismissed 0xc0170’s stale review May 26, 2020 09:48

Pull request has been modified.

@Patater
Copy link
Contributor Author

Patater commented May 26, 2020

Rebased to use default_lib or c_lib as the desired C library

@0xc0170
Copy link
Contributor

0xc0170 commented May 26, 2020

CI started

@0xc0170
Copy link
Contributor

0xc0170 commented May 26, 2020

This one and another fix to tools, are these for 6.0 rc2?

@mbed-ci
Copy link

mbed-ci commented May 26, 2020

Test run: SUCCESS

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

@Patater
Copy link
Contributor Author

Patater commented May 26, 2020

This one and another fix to tools, are these for 6.0 rc2?

Possibly more needed to fix. We haven't hit the bottom of debugging yet; we haven't had a full run of our tests working yet.

@0xc0170 0xc0170 merged commit a802ab8 into ARMmbed:master May 27, 2020
@mergify mergify bot removed the ready for merge label May 27, 2020
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.

5 participants