-
Notifications
You must be signed in to change notification settings - Fork 684
Modify the profile option to specify external compile definitions. #1497
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
Modify the profile option to specify external compile definitions. #1497
Conversation
2ac536a
to
5e9bfe4
Compare
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.
Good patch.
|
||
### Using profiles with the build system | ||
|
||
You can add profile for the build system in two way: |
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.
You can specify the profile for the build system in the following ways:
|
||
You can add profile for the build system in two way: | ||
* with absolute path | ||
* with a name (in this case the given profile name is assumed in the `profiles` folder) |
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.
(this options selects profiles/$(name).profile
file)
|
||
#### Restrictions | ||
|
||
The profile files can contain comments, but cannot have multi-line compile definitions, and any comma characters. |
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.
Only single line options are allowed in the profile file. Any line starting with hash-mark is ignored. Semicolon character is not allowed.
|
||
``` | ||
# assuming you are in jerryscript folder | ||
./tools/build.py --profile=/path/to/profile/my_profile.profile |
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.
/absolute/path/to/my_profile.any_extension
``` | ||
# assuming you are in jerryscript folder | ||
./tools/build.py --profile=minimal | ||
``` |
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.
This command selects the profile/minimal.profile file.
@@ -0,0 +1 @@ | |||
# Intentionally empty |
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.
Currently an empty profile.
|
||
#### 2. Using only CMake build system | ||
|
||
Set the FEATURE_PROFILE compile definition with one of the following values: |
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.
Set FEATURE_PROFILE option to one of the following values:
5e9bfe4
to
28e6511
Compare
@zherczeg : Thanks! I've modified this patch based on your suggestions. |
LGTM |
ed92549
to
e9d26d3
Compare
@@ -60,7 +63,7 @@ def devhelp(help): | |||
parser.add_argument('--linker-flag', metavar='OPT', action='append', default=[], help='add custom linker flag') | |||
parser.add_argument('--lto', metavar='X', choices=['ON', 'OFF'], default='ON', type=str.upper, help='enable link-time optimizations (%(choices)s; default: %(default)s)') | |||
parser.add_argument('--port-dir', metavar='DIR', action='store', default=DEFAULT_PORT_DIR, help='add port directory (default: %(default)s)') | |||
parser.add_argument('--profile', metavar='PROFILE', choices=['es5.1', 'minimal', 'es2015-subset'], default='es5.1', type=str.lower, help='specify the profile (%(choices)s; default: %(default)s)') | |||
parser.add_argument('--profile', metavar='FILE', action='store', default=DEFAULT_PROFILE, help='specify profile file (default: %(default)s)') |
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.
If the directory of profiles is hard coded, then we can set the 'choices' attribute like before.
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.
It's not hard coded. You can specify the profile file with absolute path, even if it's not in the profiles
folder.
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 see.
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.
LGTM
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka [email protected]
e9d26d3
to
3d0010c
Compare
…erryscript-project#1497) JerryScript-DCO-1.0-Signed-off-by: Robert Sipka [email protected]
No description provided.