Modify the profile option to specify external compile definitions. (#1497)

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
Robert Sipka
2017-01-02 10:47:50 +01:00
committed by László Langó
parent 080e78d7c2
commit 392f6d4a3b
7 changed files with 81 additions and 26 deletions
+39
View File
@@ -0,0 +1,39 @@
### About profile files
Specify compile definitions in profile files to use when compiling the `jerry-core` target.
The default profile is ``es5.1`` which disables the ArrayBuffer built-in.
### Using profiles with the build system
You can specify the profile for the build system in the following ways:
* with absolute path
* with a name (this options selects profiles/$(name).profile file)
#### Restrictions
Only single line options are allowed in the profile file. Any line starting with hash-mark is ignored. Semicolon character is not allowed.
### Example usage:
#### 1. Using the build script
```
# assuming you are in jerryscript folder
./tools/build.py --profile=/absolute/path/to/my_profile.any_extension
```
or
```
# assuming you are in jerryscript folder
./tools/build.py --profile=minimal
```
This command selects the profile/minimal.profile file.
#### 2. Using only CMake build system
Set FEATURE_PROFILE option to one of the following values:
* the profile with absolute path
* name of the profile (which needs to exist in the `profiles` folder)
@@ -0,0 +1 @@
# Currently an empty profile.
+1
View File
@@ -0,0 +1 @@
CONFIG_DISABLE_ARRAYBUFFER_BUILTIN
+11
View File
@@ -0,0 +1,11 @@
CONFIG_DISABLE_ARRAYBUFFER_BUILTIN
CONFIG_DISABLE_ANNEXB_BUILTIN
CONFIG_DISABLE_ARRAY_BUILTIN
CONFIG_DISABLE_BOOLEAN_BUILTIN
CONFIG_DISABLE_DATE_BUILTIN
CONFIG_DISABLE_ERROR_BUILTINS
CONFIG_DISABLE_JSON_BUILTIN
CONFIG_DISABLE_MATH_BUILTIN
CONFIG_DISABLE_NUMBER_BUILTIN
CONFIG_DISABLE_REGEXP_BUILTIN
CONFIG_DISABLE_STRING_BUILTIN