-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
### 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
tools/build_api.py
Outdated
@@ -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!") |
There was a problem hiding this comment.
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"
I'll remove the |
@yennster Done. Please re-review. |
/morph build |
Build : SUCCESSBuild number : 3412 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 3039 |
Test : SUCCESSBuild number : 3209 |
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