-
Notifications
You must be signed in to change notification settings - Fork 683
Disable date object related system calls by default. #929
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
Disable date object related system calls by default. #929
Conversation
25b2f28
to
27cce21
Compare
Issue analysis: In jerry-core/ecma/builtin-objects/ecma-builtin-helpers-date.c, we rely on the second argument of (Note: Real Linux kernels still provide valid tz info, that's why we haven't faced this problem until now. Moreover, our main target is a real device and not qemu emulation, of course. However, qemu is our only chance to get ARM tests work on Travis. So we should deal with the issue, IMHO.) We could work around the trouble. At both places where we use the second argument, we use Conclusions: I wouldn't guard out date syscalls but would go with the initializations. Notes:
|
The return value is |
0e5d255
to
e05176a
Compare
@akiss77, updated the PR. There are still build issues with external compilers. (Ex.: https://launchpad.net/gcc-arm-embedded/5.0/5-2015-q4-major/+download/gcc-arm-none-eabi-5_2-2015q4-20151219-linux.tar.bz2) So I still prefer to disable by default. |
* Note: | ||
* Experimental. Works on Ubuntu 14.04. | ||
*/ | ||
// #define ECMA_ENABLE_DATE_SYS_CALLS |
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.
Is there a way to enable the calls without editing config.h? If not, we wont be testing it "ever" -- neither with local precommit checks, nor on Travis. Which makes all gettimeofday-related code paths effectively dead. External tool chains are not the primary targets (strictly IMHO). If their users need tweaks, they shoud be the one to do edits to config.h.
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 looked like to me that is the common way. (see: CONFIG_VM_RUN_GC_AFTER_EACH_OPCODE) But I agree with you. A build option would be good.
e05176a
to
7ffaff6
Compare
@akiss77, updated the patch. You can enable sys calls with |
The guards still make me sad, but LGTM (FWIW). |
LGTM |
Use DATE_SYS_CALLS=ON for make target to enable the date related system calls. Also fix some minor issues. Related issue: jerryscript-project#923 JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
7ffaff6
to
9bf1ecc
Compare
gettimeofday
system call cause problems on multiple platforms, so better to disable by default.Related issue: #923
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com