Skip to content

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

Merged
merged 1 commit into from
Jan 2, 2017

Conversation

robertsipka
Copy link
Contributor

No description provided.

@robertsipka robertsipka force-pushed the profile_modes branch 3 times, most recently from 2ac536a to 5e9bfe4 Compare December 16, 2016 12:23
@LaszloLango LaszloLango added the enhancement An improvement label Dec 16, 2016
Copy link
Member

@zherczeg zherczeg left a 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:
Copy link
Member

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)
Copy link
Member

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.
Copy link
Member

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
Copy link
Member

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
```
Copy link
Member

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
Copy link
Member

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:
Copy link
Member

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:

@robertsipka
Copy link
Contributor Author

@zherczeg : Thanks! I've modified this patch based on your suggestions.

@zherczeg
Copy link
Member

LGTM

@robertsipka robertsipka force-pushed the profile_modes branch 2 times, most recently from ed92549 to e9d26d3 Compare December 21, 2016 12:09
@@ -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)')
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see.

Copy link
Contributor

@LaszloLango LaszloLango left a comment

Choose a reason for hiding this comment

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

LGTM

@LaszloLango LaszloLango merged commit 392f6d4 into jerryscript-project:master Jan 2, 2017
t-harvey pushed a commit to t-harvey/jerryscript that referenced this pull request Jan 4, 2017
@robertsipka robertsipka deleted the profile_modes branch March 16, 2017 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants