0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

172 Commits

Author SHA1 Message Date
Steven R. Loomis
f769d133b7 build: i18n: move noisy variables to separate gypi
Fixes: https://github.com/joyent/node/issues/7676#issuecomment-57535890
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-10-07 15:17:44 -07:00
Steven R. Loomis
ac2857b12c build, i18n: improve Intl build, add "--with-intl"
The two main goals of this change are:
 - To make it easier to build the Intl option using ICU (particularly,
   using a newer ICU than v8/Chromium's version)
 - To enable a much smaller ICU build with only English support The goal
   here is to get node.js binaries built this way by default so that the
   Intl API can be used. Additional data can be added at execution time
   (see Readme and wiki)

More details are at https://github.com/joyent/node/pull/7719

In particular, this change adds the "--with-intl=" configure option to
provide more ways of building "Intl":
 - "full-icu" picks up an ICU from deps/icu
 - "small-icu" is similar, but builds only English
 - "system-icu" uses pkg-config to find an installed ICU
 - "none" does nothing (no Intl)

For Windows builds, the "full-icu" or "small-icu" options are added to
vcbuild.bat.

Note that the existing "--with-icu-path" option is not removed from
configure, but may not be used alongside the new option.

Wiki changes have already been made on
 https://github.com/joyent/node/wiki/Installation
and a new page created at
 https://github.com/joyent/node/wiki/Intl
(marked as provisional until this change lands.)

Summary of changes:

* README.md : doc updates

* .gitignore : added "deps/icu" as this is the location where ICU is
  unpacked to.

* Makefile : added the tools/icu/* files to cpplint, but excluded a
  problematic file.

* configure : added the "--with-intl" option mentioned above.
  Calculate at config time the list of ICU source files to use and data
  packaging options.

* node.gyp : add the new files src/node_i18n.cc/.h as well as ICU
  linkage.

* src/node.cc : add call into
  node::i18n::InitializeICUDirectory(icu_data_dir) as well as new
  --icu-data-dir option and NODE_ICU_DATA env variable to configure ICU
  data loading. This loading is only relevant in the "small"
  configuration.

* src/node_i18n.cc : new source file for the above Initialize..
  function, to setup ICU as needed.

* tools/icu : new directory with some tools needed for this build.

* tools/icu/icu-generic.gyp : new .gyp file that builds ICU in some new
  ways, both on unix/mac and windows.

* tools/icu/icu-system.gyp : new .gyp file to build node against a
  pkg-config detected ICU.

* tools/icu/icu_small.json : new config file for the "English-only" small
  build.

* tools/icu/icutrim.py : new tool for trimming down ICU data. Reads the
  above .json file.

* tools/icu/iculslocs.cc : new tool for repairing ICU data manifests
  after trim operation.

* tools/icu/no-op.cc : dummy file to force .gyp into using a C++ linker.

* vcbuild.bat : added small-icu and full-icu options, to call into
  configure.

* Fixed toolset dependencies, see
  https://github.com/joyent/node/pull/7719#issuecomment-54641687

Note that because of a bug in gyp {CC,CXX}_host must also be set.
Otherwise gcc/g++ will be used by default for part of the build.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-10-01 12:16:51 -07:00
Timothy J Fontaine
7ca5af87a0 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	ChangeLog
	deps/v8/src/hydrogen.cc
	lib/http.js
	lib/querystring.js
	src/node_crypto.cc
	src/node_version.h
	test/simple/test-querystring.js
2014-09-16 17:48:09 -07:00
Fedor Indutny
627c1a92eb configure: add --openssl-no-asm flag
see #8062

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2014-09-03 17:35:18 +04:00
Jesús Leganés Combarro "piranna
cdc01faed2 configure: generate a fully statically linked exec
Allow to create an executable with no external dynamic libraries, also the
ones from the system. This is somewhat dependent of the used C lib, for
example glibc has some internal dynamic libraries loaded by itself, but for
other ones like eglibc or dietlib, this would produce a true static linked
executable. This can be of interest for embebers or resource constraints
platforms, but the main reason for this is to allow to use a Javascript
file as Linux kernel 'init' on NodeOS.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-09-02 22:20:52 +04:00
Fedor Indutny
f310c0f16b Merge remote-tracking branch 'origin/v0.10' into master
Conflicts:
	doc/api/buffer.markdown
	lib/_stream_readable.js
	lib/assert.js
	lib/buffer.js
	lib/child_process.js
	lib/http.js
	lib/string_decoder.js
	lib/zlib.js
	node.gyp
	test/simple/test-buffer.js
	test/simple/test-https-foafssl.js
	test/simple/test-stream2-compatibility.js
	test/simple/test-tls-server-verify.js
2014-07-29 12:51:27 +04:00
Maciej Małecki
300dd3499c gyp: fix ARM build
According to V8 changelog, `armv7` config variable was replaced by
`arm_version`, with value either '7', '6' or 'default'.

Detect ARMv7 and ARMv6 CPUs and default to 'default'.

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-23 23:42:22 +04:00
Trevor Norris
449ffecbb0 configure: fix v8 overriding commands on build
V8 seems to ignore the default value for want_separate_host_toolset and
would override it at build time. Instead always explicitly set the value.

Fixes #7833
2014-07-02 13:32:11 -07:00
Refael Ackermann
423725b34d configure: better detect windows 'bitness' (WOW64)
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-07-01 15:48:42 +04:00
Fedor Indutny
9920ae67b5 Merge branch 'v0.10'
Conflicts:
	ChangeLog
	lib/events.js
	lib/tls.js
	src/node_constants.cc
	src/node_crypto.cc
	src/node_crypto.h
	src/node_version.h
2014-06-05 07:28:39 -07:00
Andrei Sedoi
1d90b5b78e configure: allow V8 snapshot for cross-compilation
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-16 13:15:25 +04:00
Ben Noordhuis
490d5ab780 configure: make --v8-options switch more robust
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.
2014-04-01 18:55:52 +04:00
Fedor Indutny
b55c9d68aa configure: --v8-options option
Introduce a way to set some v8 flags at compile time, the values should
be separated by comma.
2014-03-29 11:51:41 +04:00
Fedor Indutny
78d245f5b2 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	configure
	lib/_stream_readable.js
	lib/http.js
	src/node_dtrace.cc
2014-03-02 23:54:19 +04:00
Timothy J Fontaine
afc29ed397 src: update to latest libuv api
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
2014-02-26 18:15:07 -08:00
Fedor Indutny
b7776fb192 configure: allow --with-dtrace on freebsd 2014-02-21 00:46:26 +04:00
Fedor Indutny
0afdfae0eb configure: always set arm_float_abi
When not specified as a configure flag, and not derived from system
configuration, `arm_float_abi` should be set to `'default'`.

fix #6789
2014-01-09 01:08:29 +04:00
Timothy J Fontaine
f9f9239fa2 build: older pythons don't support ternary if 2013-12-07 11:49:49 -08:00
Timothy J Fontaine
fcca3585fe Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	lib/tls.js
	src/node.js
2013-12-06 21:27:18 -08:00
Timothy J Fontaine
2905884b63 build: pass --no-parallel by default to gyp
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
2013-12-06 21:07:46 -08:00
Timothy J Fontaine
b5e161989c build: ./configure pass positional args to gyp
use `--` to specify the arguments you want to pass directly to gyp.

for example: `./configure -- --no-parallel -Dsome_define=foo`

fixes #6370
2013-12-06 21:07:00 -08:00
Ben Noordhuis
9e32a7daaa build: add libicu i18n support
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.
2013-12-05 16:15:21 -08:00
Timothy J Fontaine
2329a254b4 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/AUTHORS
	deps/uv/ChangeLog
	deps/uv/README.md
	deps/uv/build.mk
	deps/uv/src/unix/core.c
	deps/uv/src/unix/darwin-proctitle.c
	deps/uv/src/unix/darwin.c
	deps/uv/src/unix/fsevents.c
	deps/uv/src/unix/udp.c
	deps/uv/src/version.c
	deps/v8/src/platform-solaris.cc
	deps/v8/test/cctest/test-api.cc
	lib/tls.js
	src/node.h
	src/node_version.h
2013-11-18 13:41:17 -08:00
Ben Noordhuis
f230a1cf74 v8: upgrade to 3.22.24
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.
2013-11-11 02:40:36 +01:00
Timothy J Fontaine
2010985354 gyp: update to bebdcea 2013-11-10 15:15:34 -08:00
Ben Noordhuis
146b2e267b build: make v8 use random seed for hash tables
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.
2013-11-08 22:26:50 +01:00
Ben Noordhuis
c4def505cb build: use zero overhead systemtap probes
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.
2013-10-29 21:55:48 +01:00
Andrei Sedoi
3546825b14 configure: add mips-float-abi (soft, hard) option 2013-09-07 22:25:50 +02:00
Ben Noordhuis
39aa894035 build: disable SSLv2 by default
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.
2013-08-10 15:46:06 +02:00
Ben Noordhuis
c937f5b587 build: fix up style issues in configure script
* Use single quotes consistently.
* Remove a few stray semicolons.
* Fix up some overly long lines.
* Line up a few expressions.
2013-08-10 15:26:11 +02:00
Ben Noordhuis
52e47b24b3 configure: order configure switches alphabetically
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.
2013-08-10 13:41:20 +02:00
Timothy J Fontaine
e851fef60f build: embed the mdb_v8.so into the binary
This builds and includes the mdb_v8.so in the binary of node so mdb
can be sure to always use the latest version
2013-08-05 14:19:29 -07:00
Ben Noordhuis
9b3de60d35 build: remove --unsafe-optimizations flag
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.
2013-07-06 16:53:07 +02:00
Ben Noordhuis
30e7d08d93 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	lib/buffer.js
	lib/http.js
	src/node.cc
2013-07-05 02:40:39 +02:00
isaacs
adf9b67e59 Merge remote-tracking branch 'ry/v0.10' into master
Conflicts:
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/src/unix/stream.c
	deps/uv/src/version.c
	deps/v8/build/common.gypi
	deps/v8/src/frames.h
	deps/v8/src/runtime.cc
	deps/v8/test/mjsunit/debug-set-variable-value.js
	lib/http.js
	src/node_version.h
2013-06-25 11:12:33 -07:00
Ben Noordhuis
a0b6df080d Revert "configure: fix cross-compilation host_arch_cc()"
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.
2013-06-25 12:47:24 +02:00
Linus Mårtensson
5e4e8ec429 build: add android support
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.
2013-06-17 17:21:56 +02:00
Andrei Sedoi
acbdabb74b configure: fix cross-compilation host_arch_cc()
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.
2013-06-14 16:10:51 +02:00
Andrei Sedoi
884b25356f openssl: add missing configuration pieces for MIPS 2013-06-13 13:27:58 +02:00
isaacs
ba048e72b0 Merge remote-tracking branch 'ry/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	configure
	deps/uv/ChangeLog
	deps/uv/src/unix/darwin.c
	deps/uv/src/unix/stream.c
	deps/uv/src/version.c
	deps/v8/src/isolate.cc
	deps/v8/src/version.cc
	lib/http.js
	src/node_version.h
2013-05-27 14:46:52 -07:00
Nathan Rajlich
99b737bd60 configure: respect the --dest-os flag consistently
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.
2013-05-21 18:38:11 -07:00
Timothy J Fontaine
f0d80d7db0 dtrace: enable uv's probes if enabled 2013-05-15 15:07:53 -07:00
Timothy J Fontaine
85e4fc4306 build: Makefile should respect configure --prefix
Fixes a regression that got introduced in commit ddf4d1a.
2013-04-24 19:54:59 +02:00
Ben Noordhuis
223607c90f build: fix arm build after v8 upgrade
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.
2013-04-19 14:54:37 +02:00
Dave Pacheco
ec69fcf425 build: allow building with dtrace on osx 2013-04-03 09:52:56 -07:00
Dave Pacheco
fe7440ce19 build: allow building with dtrace on osx 2013-03-30 01:04:00 +01:00
Nathan Rajlich
b916774255 configure: define "arm_fpu" and "arm_neon" for ARM
v8's common.gypi file expects them to be defined now.

Closes #4534.
2013-01-10 17:13:59 -08:00
Scott Blomquist
a616774281 windows: improve Visual Studio Express build support
* Moved generated files to a clearer directory.
* Improved detection logic for ctrpp.exe tool.

Closes #4482
2013-01-03 23:38:25 +01:00
isaacs
4be9c695f0 build: Add hyphen to custom build tags
so that ./configure --tag=foo makes a version number like v0.9.5-foo
instead of v0.9.5foo
2012-12-26 20:35:00 -08:00
Maciej Małecki
f84bf5b6b1 build: allow to specify custom tags
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.
2012-12-21 12:44:33 -08:00