Skip to content

Tools: Omit include path parents when they're scan rules #7623

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
Aug 1, 2018

Conversation

theotherjimmy
Copy link
Contributor

@theotherjimmy theotherjimmy commented Jul 27, 2018

Description

Realistically, people don't do the following:

#include "TARGET_Freescale/mbed_rtx.h"

instead, they do this:

#include "mbed_rtx.h"

Knowing this, I remove collecting of include paths "through label
directories". Label directories are the things we scan for when building.
They start with TARGET_, TOOLCHAIN_ and FEATURE_. This PR collects
include path parents up to the first label dir.
I think an example is in order. Here is the Mbed OS targets directory:

targets
├── TARGET_ARM_FM
├── TARGET_ARM_SSG
├── TARGET_Analog_Devices
├── TARGET_Atmel
├── TARGET_Freescale
│  ├── TARGET_K20XX
│  ├── TARGET_KLXX
│  ├── TARGET_MCUXpresso_MCUS
│  └── mbed_rtx.h
├── TARGET_Maxim
├── TARGET_NORDIC
├── TARGET_NUVOTON
├── TARGET_NXP
├── TARGET_ONSEMI
├── TARGET_RENESAS
├── TARGET_Realtek
├── TARGET_STM
├── TARGET_Silicon_Labs
├── TARGET_TOSHIBA
├── TARGET_WICED
├── TARGET_WIZNET
├── TARGET_ublox
└── targets.json

Notice how there is no header file in the targets directory. When we
add include paths for the K64F, we would all parents of
targets/TARGET_Freescale/mbed_rtx.h. Which would be:

targets/TARGET_Freescale
targets

That's overkill. Instead this PR reduces this example to the following
include paths:

targets/TARGET_Freescale

While this may seem great, you would be hard pressed to measure this
improvement. It reduce the include paths by an entire 0.5% on MCC by
my measurements (20346, with this change; 20439 without).

Pull request type

[x] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

by 0.45% for Mbed Cloud Client
@theotherjimmy theotherjimmy changed the title Tools: Omit include path parents when they're scan rules ### Description Tools: Omit include path parents when they're scan rules Jul 27, 2018
@theotherjimmy
Copy link
Contributor Author

@deepikabhavnani @cmonr This is not as good as I hoped. All well.

Copy link
Contributor

@cmonr cmonr left a comment

Choose a reason for hiding this comment

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

Interesting.

@cmonr
Copy link
Contributor

cmonr commented Jul 31, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jul 31, 2018

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Jul 31, 2018

@mbed-ci
Copy link

mbed-ci commented Aug 1, 2018

@cmonr
Copy link
Contributor

cmonr commented Aug 1, 2018

@studavekar @ARMmbed/mbed-os-test Are y'all able to confirm that the SPIF lib is being setup correctly? Unsure if this is a PR, examples.py, or CI config issue.

@studavekar
Copy link
Contributor

@studavekar @ARMmbed/mbed-os-test Are y'all able to confirm that the SPIF lib is being setup correctly? Unsure if this is a PR, examples.py, or CI config issue.

Looks like it was a GitHub issue https://mbed-os.mbedcloudtesting.com/job/build_wrapper/5352/console

00:05:07.027 ssh: Could not resolve hostname github.com: Temporary failure in name resolution
00:05:07.028 fatal: Could not read from remote repository.
00:05:07.028 
00:05:07.028 Please make sure you have the correct access rights
00:05:07.028 and the repository exists.
00:05:07.637 abort: HTTP Error 406: Not Acceptable

image

@cmonr
Copy link
Contributor

cmonr commented Aug 1, 2018

/morph export-build

@mbed-ci
Copy link

mbed-ci commented Aug 1, 2018

@cmonr cmonr merged commit 4cab24f into ARMmbed:master Aug 1, 2018
@adbridge
Copy link
Contributor

Relies on #7183 which is scheduled for 5.10

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
Tools: Omit include path parents when they're scan rules
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.

6 participants