Improve on commit b55c9d6 by not requiring that switches are comma
separated. This commit makes `./configure --v8-options="--foo --bar"`
work and takes special care to properly escape quotes in the options
string.
libuv gyp builds now require you to define the library disposition
(static or shared).
Also, libuv now supports vectored IO for file system reads and writes,
update to those function signatures
gyp by default now tries to process gyp files in parallel by using
python's multiprocessing module, but it has problems on oddball
platforms. We don't have many files or complex dependency chains that
would benefit from parallel processing so disable by deafult
fixes#6640
Adds a --with-icu-path= switch to the configure script. Requires that
the user checks out the copy of libicu that's bundled with chromium to
a fixed directory. It's still a little rough around the edges but it
works.
Fixes#6371.
This commit removes the simple/test-event-emitter-memory-leak test for
being unreliable with the new garbage collector: the memory pressure
exerted by the test case is too low for the garbage collector to kick
in. It can be made to work again by limiting the heap size with the
--max_old_space_size=x flag but that won't be very reliable across
platforms and architectures.
Upstream V8 as of commit v8/v8@4bc70e8 uses a fixed seed of 314159265
for hash tables unless instructed otherwise. Tell V8 to keep using a
random seed.
Profiling suggested that on Linux sometimes over 10% of CPU time was
being spent inside the systemtap probe entry points in the binding
layer, even when the process was not actively being traced with the
`stap` tool.
That's why this commit makes it possible to use the *_ENABLED() macros
and bail out early when we're not being traced, reducing the overhead
of unused probes to (almost) zero.
Said macros were already being generated by `dtrace -h` but were not
usable because they rely on external definitions. To remedy that, we
now generate the accompanying object files with `dtrace -G`.
This commit includes a change to libuv that has been landed upstream in
commit joyent/libuv@3c172ea.
No one in this day and age should be using SSLv2 so disable it by
default. You can re-enable it with `./configure --with-sslv2` but
there really should be no reason for that.
Alphabetical order should make it easier to find the switches you need
because we've got quite a lot of them now.
Keep --prefix at the top because that's arguably the one people will be
looking for most.
The previous commit removes our patch that builds V8 at -O2 rather
than -O3 so there is not much point in keeping the configure switch
around.
The reason it did so was to work around an assortment of compiler and
linker bugs. In particular, certain combinations of g++ and binutils
generate bad or no code when -ffunction-sections or -finline-functions
is enabled (which -O3 implicitly does.)
It was quite the problem back in the day because everyone and his dog
built from source. Now that we have prebuilt binaries and packages
available, there is no longer a pressing need to be so accommodating.
If you experience spurious (or possibly not so spurious) segmentation
faults after this commit, you need to upgrade your compiler/linker
toolchain.
Several people have reported cross-compiling build breakage, see e.g.
https://groups.google.com/forum/#!topic/nodejs/k8HzqpqPkJQ
Message-Id: <823c3bd1-e104-4409-86ad-0ab6de936fec@googlegroups.com>
Subject: [nodejs] nodejs 0.10.12 and Angstrom issues
This reverts commit acbdabb74b.
Resolves minor discrepancies between android and standard POSIX systems.
In addition, some configure parameters were added, and a helper-script
for android configuration. Ideally, this script should be merged into
the standard configure script.
To build for android, source the android-configure script with an NDK
path:
source ./android-configure ~/android-ndk-r8d
This will create an android standalone toolchain and export the
necessary environment parameters.
After that, build as normal:
make -j8
After the build, you should now have android-compatible NodeJS binaries.
In case of cross-compilation host_arch_cc() function could return
target arch if CC was set to target arch compiler. Host arch
compiler should always be used in this case. This was broken
by commit 707863c.
Consider a user on his Mac, who wants to cross-compile for his Linux ARM device:
./configure --dest-cpu=arm --dest-os=linux
Before this patch, for example, DTrace probes would incorrectly attempt to be
enabled because the configure script is running on a MacOS machine, even though
we're trying to compile a binary for `linux`.
With this patch, the `--dest-os` flag is respected throughout the configure
script, thus leaving DTrace probes disabled in this cross-compiling scenario.
V8 was upgraded to 3.18 in commit 9f68226. The knobs that control the
ARM build have changed in a number of ways. This commit patches the
configure script to reflect that. Should fix the Raspberry Pi build.
Fixes#5329.
When building custom `node` versions (e.g., floating features/fixes from
different versions) it's often useful to specify a custom tag which
easily identifies build when invoking `node -v`.
Introduce a way to specify this tag in `node_version.h` file or by
running `./configure --tag="<tag>"`. Insert it right after the patch
version (and before `-pre`, if build is not a release).
Closes#4452.
DTrace on Linux should not be enabled by default because not all systems will
have the proper headers installed. Only enable when --with-dtrace is passed to
the configure script.
Unconditionally compile V8 with -fno-strict-aliasing on all platforms.
gcc 4.5.2 on sunos generates bad code when -fstrict-aliasing is enabled, which
undoubtedly means that there are more buggy versions of gcc out there.
-fstrict-aliasing does not give a significant performance boost so let's just
disable it.
Fixes#3736.
V8 on ARM requires that armv7 is set. We don't have a good way to detect the
CPU model right now so we pick a default and hope that it works okay for the
majority of people.
Non-scientific sampling - the ARM hardware I have lying around the house -
suggests that ARMv5 and ARMv6 are still most common so armv7=0 it is.
This obviously needs to be revisited sometime in the future.
Compile at -O2 and disable optimizations that trigger gcc bugs.
Some people still reported mksnapshot crashes after commit b40f813 ("build: fix
spurious mksnapshot crashes for good" - so much for that).
Average performance of the -O2 binary is on par with the -O3 binary. Variance
on the http_simple bytes/8 benchmark appears to be slightly greater but small
enough that the possibly of it being noise cannot be excluded.
The new binary very slightly but consistently outperforms the -O3 binary (by
about 0.5%) on the mostly CPU-bound bytes/102400 benchmark. That could be an
artifact of the system I benchmarked it on, a Core 2 Duo with a puny 32 kB of
L1 instruction cache. The smaller binary seems to play nicer with the cache.
A variety of gcc bugs made mksnapshot crash with either a segmentation fault
or a 'pure virtual method callled' run-time error.
After much wailing and gnashing of teeth I managed to deduce that the bugs
show up when:
1. gcc 4.5.2 for i386-pc-solaris2.11 is used and -fstrict-aliasing is
enabled, or
2. gcc version 4.4.6 for x86_64-redhat-linux is used and
-ffunction-sections -finline-functions at -O2 or higher is enabled
Therefore, disable -ffunction-sections and -fdata-sections unconditionally
and disable -fstrict-aliasing only on Solaris.
The -ffunction-sections and -fdata-sections switches were nonsense anyway
because we don't link with -Wl,--gc-sections.
It has been conclusively demonstrated that the -fstrict-aliasing bugs in gcc's
optimizer are not limited to the 4.5.x releases only.
Fixes#3601 among others.
The heuristic introduced in f78ce08 ("build: handle output of localized gcc or
clang") does not handle "branded" versions of gcc, i.e. a gcc whose output has
been customized by the distro vendor.
Fixes#3601.
Before this commit, we used to scan the output of `$CC -v` for strings like
"gcc version x.y.z".
It was pointed out that this approach fails with localized versions of gcc
because those print (for example) "gcc versión x.y.z".
Use the output of `$CC --version` instead and only look at the first line.
For consistency's sake, rename:
--openssl-use-sys
--openssl-includes
--openssl-libpath
To:
--shared-openssl
--shared-openssl-includes
--shared-openssl-libpath
And add --shared-openssl-libname while we're at it.
The old switches still work but `./configure --help` won't print them.
Fixes#3591.
Make configure start gyp with the same python interpreter that is used to
run configure itself.
Fixes an issue where configure fails with a SyntaxError because the user
has multiple python binaries on his $PATH and the default one is too old.
This commit enables ETW events to be fired on Windows for existing
DTrace probes. ETW instrumentation is enabled by default. It
is possible to build node.exe without ETW instrumentation by
using --without-etw option with configure script.
* fixes#2110
* includes V8 postmortem metadata in Solaris builds
* adds GYP support for DTrace probes and ustack helper
* ustack helper derives constants dynamically from libv8_base.a
* build with DTrace support by default on SunOS
A compiler bug in older versions of gcc makes it do unsafe optimizations at -O1
and higher. This manifested itself with (at least) gcc 4.5.2 on SmartOS because
it made V8 hang in a busy loop.
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45883
On one of my OS X Lion machines, it always reports i386, even though 64-bit
is supported. This lookup better matches how WAF determines the host arch,
which was correctly getting 64-bit even on this screwy machine.
It was decided that the performance benefits that isolates offer (faster spin-up
times for worker processes, faster inter-worker communication, possibly a lower
memory footprint) are not actual bottlenecks for most people and do not outweigh
the potential stability issues and intrusive changes to the code base that
first-class support for isolates requires.
Hence, this commit backs out all isolates-related changes.
Good bye, isolates. We hardly knew ye.
We keep around WAF for node-waf only.
We need great diligence by people over the next couple weeks to work out all
the kinks in the GYP build system. We realize that it is currently several
times slower than the WAF build. Please lend a hand.
Fixes#1504Fixes#1500
To use the benchmarks:
node benchmarks/run.js
or:
make benchmark
The numbers reported are the elapsed milliseconds the script took to
complete. Currently only benching HTTP code and timers.
This is sloppy: after each ObjectWrap allocation the user needs to
call ObjectWrap::InformV8ofAllocation(). In addition each class deriving
from ObjectWrap needs to implement the virtual method size() which should
return the size of the derived class. If I was better at C++ I could
possibly make this less ugly. For now this is how it is.
Memory usage looks much better after this commit.