Skip to content

Tools: Don't traceback on missing linker script #8250

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
Oct 22, 2018

Conversation

theotherjimmy
Copy link
Contributor

Description

The mbed compile would traceback when no linker script is found.
This PR changes that behavior to make that into a NotSupportedException,
which has decent user behavior.

Fixes #7723

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change

### Description

The `mbed compile` would traceback when no linker script is found.
This PR changes that behavior to make that into a NotSupportedException,
which has decent user behavior.

Fixes ARMmbed#7723

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
Copy link
Contributor

@bridadan bridadan left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@@ -532,6 +532,8 @@ def build_project(src_paths, build_path, target, toolchain_name,
# Change linker script if specified
if linker_script is not None:
resources.add_file_ref(linker_script, linker_script)
if not resources.get_file_refs(FileType.LD_SCRIPT):
raise NotSupportedException("No Linker Script found!")
Copy link
Contributor

Choose a reason for hiding this comment

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

I would change this exception to match the one in __init__.py: "No linker script found"

@theotherjimmy
Copy link
Contributor Author

I'll remove the !. Just a moment.

@theotherjimmy
Copy link
Contributor Author

@yennster Done. Please re-review.

@cmonr
Copy link
Contributor

cmonr commented Oct 21, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Oct 21, 2018

Build : SUCCESS

Build number : 3412
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8250/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Oct 21, 2018

@mbed-ci
Copy link

mbed-ci commented Oct 21, 2018

@cmonr cmonr merged commit 46d717c into ARMmbed:master Oct 22, 2018
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.

7 participants