128 Commits

Author SHA1 Message Date
László Langó
ab26d57841 Don't use messages for errors by default
Use empty string for message property of builtin error objects
by default. Add ERROR_MESSAGES build option.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-09 11:44:32 +01:00
László Langó
9bf1ecc677 Disable date object related system calls by default
Use DATE_SYS_CALLS=ON for make target to enable the
date related system calls. Also fix some minor issues.
Related issue: #923

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2016-03-08 12:13:55 +01:00
Akos Kiss
c0f3a9f7fb Add STRIP_RELEASE_BINARY option to Makefile
It is already supported by CMakeLists, might be useful to allow it
to be passed through Makefile.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-04 15:19:59 +01:00
Akos Kiss
b6af308d3f Add full profile to MCU build targets
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-04 15:05:27 +01:00
Akos Kiss
86cdc4b482 Remove the prerequisites installation and MCU build steps from Travis CI
The repeated downloads of the STM packages cause a huge slow-down
of Travis, especially when the source site becomes irresponsive
(which even causes Travis to report errors when the build would
work fine otherwise). Unfortunately, the license of the STM
packages does not allow their inclusion in the repository. (Note:
locally executed `make precommit` still builds MCU targets.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-02 16:54:45 +01:00
Akos Kiss
f2bdf08511 Remove default handling of build options from Makefile
The handling of option defaults is already done in CMakeLists, it
is no good practice to duplicate the logic in the Makefile.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-03-02 12:12:40 +01:00
Akos Kiss
3d6339bbf4 Remove unused EXTERNAL_ variables from Makefile
They have been kept when the build system was refactored but it
turns out that they are not used at all (they are not passed on to
cmake).

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-29 23:31:40 +01:00
Akos Kiss
d857fe095f Improve the usability of test runner scripts
* First of all, remove the counter-intuitive "OUT_DIR" second
  argument of run-test-suite.sh. This, way, the invocation of the
  script becomes easier to remember:
  `tools/runners/run-test-suite.sh <engine> <testsuite>`
  However, this also means that all output files (lists of
  executed, passed, and failed tests) are generated in the current
  working directory.

* Align the behaviour of run-unittests.sh with the above, i.e.,
  don't try to guess where to put output files but write them in
  the CWD.

* Adapt Makefile to the change in the use of the test runner
  scripts: create and change to "check" directories before invoking
  test runner scripts.

Extras:
* tools/runners/run-test-suite.sh collected fail tests from
  directories twice. This does no harm but is inefficient, thus
  removing.
* tools/runners/run-test-suite.sh was too permissive on the
  contents of test suite list files. Better to accept those lines
  only which really contain paths to JS test files.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-22 12:04:07 +01:00
Akos Kiss
b2edaafaa1 Move cppcheck logic from Makefile and CMakeLists.txt to tools/check-cppcheck.sh
The legacy approach executed cppcheck for every build target, which
resulted in a huge number of re-checks of the sources if more than
one targets were built. The main reason behind that was to get the
right macro-guarded code paths analyzed. However, cppcheck can
analyze every configuration of the sources in one go.

(The patch also contains some aesthetic changes around the way
vera++ is called and how errors are reported.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-19 13:33:15 +01:00
Akos Kiss
f959ba95a4 Refactoring the build system
* Removed unused or unnecessary parts from various make files
* Eliminated lots of duplications from Makefile with the help of
  macros.
* Split tools/precommit.sh to its independent components:
  * the part that checks the existence of the "signed off" text in
    commit messages
    (this on got factored out to tools/check-signed-off.sh),
  * the part that uses vera++ for style checking (this one got
    factored out to tools/check-vera.sh),
  * the part that invokes targets in the cmake-generated build
    directory, and
  * the part that performs various tests (these latter two got
    moved into the Makefile).
* Moved the functionality of precommit-full-testing.sh into the
  Makefile, too.
* Added ninja build system support (e.g., `make NINJA=1`).
* Updated leading documentation comments (they were somewhat
  stale).
* Tried to keep the target names exactly the same as they were --
  almost succeeded... (some changes are intentional, and are
  subject to personal preferences).
* Simplified console output of `make precommit`
* Unified test runner scripts and their output format
  * Eliminated nothing-to-stdout everything-to-log-file policy:
    info is printed to stdout and it is the caller's
    responsibility to redirect it to a file if needed.
  * Also applied some renaming and coding style unification to
    the scripts.
* Merged the functionality of tools/runners/run-test-suite-jerry*.sh
  into the Makefile
* Merged everything related to a test suite execution in a single
  script.
  * The new script also allows to specify pass and xfail tests in
    a single list file, which was not possible hitherto.
  * Also, the paths of the test cases given in a file are
    interpreted relative to their container files.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2016-02-15 18:05:01 +01:00
Robert Sipka
977bfa5d2c Remove g++ support from the [C]Make files.
Move all '.cpp' files to '.c'.
Rename comments from 'cpp' to 'c'.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
2016-02-15 12:49:12 +01:00
Zsolt Borbély
3e1e0dc733 Move the logic of Valgrind-support check to the CMake part.
Related pull request: #866

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-02-10 16:46:56 +01:00
Zsolt Borbély
41f2f910e8 Abort the build-process when the build-configuration is unsupported
The MCU targets doesn't support Valgrind.
Related issue: #762

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2016-02-10 11:28:59 +01:00
Sung-Jae Lee
4f4407121b Disable LTO, Enable ALL_IN_ONE by default in Mac OS X build.
JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-12-19 16:08:50 +09:00
Zsolt Borbély
fe157301a2 Add option to enable all-in-one build mode
Related issue: #626

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2015-11-25 14:01:07 +01:00
Zoltan Herczeg
c81c730129 Add support for reporting mallocs / frees to valgrind through client requests.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
2015-11-03 03:57:49 -08:00
Peter Gal
0d6568db18 Fix tr arguments in the Makefile
On Linux the original tr call did nothing and thus the Makefile
tried to load the toolchain_Linux_x86_64.cmake file, which doesn't exists.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
2015-10-01 14:47:10 +02:00
Sung-Jae Lee
01f66f7b04 Enable build on Mac OS X with clang
* Add build target 'darwin'
* Modify compiler options to work with clang
* Support 'jerry-libc' on Mac OS X

For MPU target build, install `gcc-arm-none-eabi` tool chain using `Homebrew` as following.
````
brew tap PX4/homebrew-px4
brew update
brew install gcc-arm-none-eabi
````
https://pixhawk.org/dev/toolchain_installation_mac

JerryScript-DCO-1.0-Signed-off-by: Sung-Jae Lee sjlee@mail.com
2015-09-15 10:31:57 +09:00
Ruben Ayrapetyan
fdf38ab2eb Introduce GC stress testing mode (-mem_stress_test prefix; for example: debug.linux-mem_stress_test).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-09 16:28:28 +03:00
Ruben Ayrapetyan
b318de46a6 Remove 'mfp' (minimal footprint build configuration).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-09-09 16:28:28 +03:00
Ruben Ayrapetyan
264a832cc4 Implement prerequisites auto-update.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-27 17:08:10 +03:00
Ruben Ayrapetyan
55ffb0cdd1 Fix pass of USE_COMPILER_DEFAULT_LIBC from make (Makefile) to cmake (CMakeLists.txt).
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-05 14:49:36 +03:00
Ruben Ayrapetyan
f39a294bc6 Remove dependency on prerequisites for linux build.
Precommit still depends on prerequisites, as it depends on vera++, etc.

Related issue: #516

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-08-04 13:59:24 +03:00
Akos Kiss
6038173e76 Rename make target build_all to $(BUILD_ALL)
The current `Makefile` works "as is" since `$(BUILD_ALL)` is
`build_all`. However, the target `build` depends on `$(BUILD_ALL)`,
so should that variable ever be changed, it will break.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:49 +02:00
Akos Kiss
8d9658913b Get all phony targets declared
It is generally a good practice to have the `.PHONY` declarations
close to the affected targets themselves (instead of declaring them
phony in one group at the end of the `Makefile`) so as not to miss
any. (As it already happened to the `log`, `precommit`,
`build_all`, etc., targets.) Thus, removed the one big declaration
from the end of the file and prepended all phony targets with a
declaration separately.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:48 +02:00
Akos Kiss
f8ee565016 Split independent commands in make recipes
Mostly, there is no need for joining commands with `&&` in recipes
since make already applies the exit-on-error functionality to each
executed line, unless there is a shell interdependency between them
(like setting environment variables in one command and using it in
another, or changing the working directory, which would not work
because of the new-subshell-per-line behaviour of make). Thus, some
independent commands can be split in the `Makefile` to improve
readability.

(Some space/tab inconsistensies are also fixed.)

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:48 +02:00
Akos Kiss
1a4e66a013 Extend non-quiet make mode with log echo
If `VERBOSE` is defined, cmake, sub-make, and tool logs are also
echoed on stdout. Default behaviour is still quiet mode, however.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:48 +02:00
Akos Kiss
f4c24f063d Enable non-quiet make
Replace most of echo-suppressing `@`s with `$(Q)`. `$(Q)` defaults
to `@` to preserve current behaviour, however, should anyone need
or prefer echoed lines, defining `VERBOSE` on the command line for
make makes it possible.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2015-07-16 23:39:48 +02:00
Ruben Ayrapetyan
393d693e23 Introduce 'USE_COMPILER_DEFAULT_LIBC' for switching from jerry-libc to a libc, provided by compiler.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:02:40 +03:00
Evgeny Gavrin
ddc3f0d6e8 Remove nuttx from prerequisites.
Related issue: #313

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-07-08 13:17:14 +03:00
Evgeny Gavrin
444bd32d50 Add support of cross-compilation for linux-based targets.
Usage:
- Cross compile:
make debug.linux TOOLCHAIN=./build/configs/toolchain_linux_armv7l-el.cmake
- Build unittests
make unittests TOOLCHAIN=./build/configs/toolchain_linux_armv7l-el.cmake
- Run unittests on target board
./tools/runners/run-unittests-remote.sh <ip> <login> <pass>
- Run JavaScript test on target board
./tools/runners/run-tests-remote.sh debug.linux <ip> <login> <pass>

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-30 15:03:36 +03:00
Evgeny Gavrin
216dc251ec Remove support of plug-in mechanism.
This API is obsolete and can be fully replaced with existing `api.h`.

JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
2015-06-23 13:56:46 +03:00
Ruben Ayrapetyan
57c6c377af Small enhancements of unit tests implementation style and fix of the tests' modules naming style.
- introducing TEST_RANDOMIZE macro for randomization of source data used in unit tests;
 - replacing assert with JERRY_ASSERT;
 - renaming test_* to test-*.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-13 16:10:36 +03:00
Andrey Shitov
d6c9c5911e Add logging support for linux.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-05-20 15:28:36 +03:00
Tamas Czene
7dfbc88cc0 Added Math functions
JerryScript-DCO-1.0-Signed-off-by: Tamas Czene tczene.u-szeged@partner.samsung.com
2015-05-19 18:09:12 +02:00
Ruben Ayrapetyan
2852d93af6 Fixing toolchain_external.cmake build configuration: generalizing it from Nuttx OS.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-08 21:02:33 +03:00
Ruben Ayrapetyan
290eb2f9b0 Adding support to specify interfaces for external libraries other than libc.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-08 21:02:31 +03:00
Ruben Ayrapetyan
9b0125086f Introducing minimal footprint build modifier (mfp).
The modifier disables lookup cache and adds GC invocation after each opcode execution.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 18:54:50 +03:00
Ruben Ayrapetyan
5e3c9b59ef Adding script for automatic download of prerequisites.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-04-30 15:16:31 +03:00
Ruben Ayrapetyan
3218a87a7f Replacing 'uname -p' with 'uname -m' in Makefile. 2015-04-13 20:38:02 +03:00
Ruben Ayrapetyan
80d9328c1f Providing option for disabling LTO build mode. 2015-03-27 14:19:33 +03:00
Ruben Ayrapetyan
4cf575c40c Adding missing Nuttx headers, removing .gitignore files from ./third-party/nuttx, fixing default Nuttx include path in Makefile. 2015-03-26 21:36:55 +03:00
Ruben Ayrapetyan
9bcf734bd1 Adding build directory targets to .PHONY list in Makefile. 2015-03-26 17:46:42 +03:00
Ruben Ayrapetyan
c8f78c5d28 Nuttx build support. 2015-03-23 12:10:27 +03:00
Ruben Ayrapetyan
d83d8e0b36 Removing build of multiple identical jerry-libc and plugins libraries copies. Fixing parallel build / precommit invocation without using the workaround. 2015-03-19 19:06:02 +03:00
Ruben Ayrapetyan
b6d018d019 Enable cppcheck run during precommit testing 2015-02-17 18:43:54 +03:00
Ruben Ayrapetyan
92a9d6db45 Moving precommit testing scripts from Makefile[.mk] to tools/runners/run-precommit-check-for-target.sh and tools/precommit.sh; deleting Makefile.mk. 2015-02-17 15:28:13 +03:00
Ruben Ayrapetyan
03c81e96e9 Turning on unit tests build and run during precommit. 2015-02-16 19:35:15 +03:00
Ruben Ayrapetyan
2667281745 Adding VALGRIND={ON,OFF} make option. 2015-02-16 14:02:32 +03:00
Ruben Ayrapetyan
43ea53b1d7 Jerry is now split to several components: core, libc, plugins.
The components are build independently and then are linked with main module corresponding to target platform.
Core is supposed to be platform-independent, while libc and plugins are dependent on specific architecture / platform.

The commit disables unit tests building and running during precommit.
That is supposed to be fixed in a subsequent commit.

Also, the commit disables building and running valgrind targets during precommit.
Build is supposed to be turned on by an option that should be introduced later.
Valgrind-checked runs are supposed to be performed in asynchronous mode.
2015-02-13 21:54:27 +03:00