Skip to content

Fixed float-abi linker option for CCES exporter. #7011

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 1 commit into from
May 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tools/export/cces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ def format_src_path(path):
return CCES.format_path(path, "PARENT-1-PROJECT_LOC/")

@staticmethod
def clean_flags(container, flags):
def clean_flags(container, flags_to_remove):
"""
Some flags are handled by CCES already, so there's no need
to include them twice.
"""
for flag in container:
if flag in flags:
flags.remove(flag)
for flag in flags_to_remove:
if flag in container:
container.remove(flag)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you split this rename into another commit?

Choose a reason for hiding this comment

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

For my own education, could you clarify why it should be a separate commit? Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

This change (as far as I can tell) is unrelated. I would like to keep the changes related to the fix separate from format/naming changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The rename was added because the bug was caused by a confusion over what the two arguments referred to. By renaming the arguments it should avoid such a confusion in the future. You'll notice that there was more change here than just the rename; the container flags are now removed instead of the flags_to_remove flags

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Thanks for the explanation!


@staticmethod
def parse_flags(flags, options, booleans):
Expand Down
6 changes: 3 additions & 3 deletions tools/export/cces/cces.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@
]
},
{% if float_abi %}
"-mfloat-abi=${value}" : {
"type" : "command",
"value" : "{{ float_abi }}"
"arm.toolchain.gcc.cpp.linker.option.fpu.abi" : {
"type" : "baseId",
"value" : "arm.toolchain.gcc.c.linker.option.fpu.abi.{{ float_abi }}"
},
{% endif %}
"-T" : {
Expand Down