build: fix cctest target with --enable-static
ref issue: #17991 (closed) Currently the cctest target build will fail if configured with --enable-static
$ ./configure --enable-static $ make
There're some function multiple definition errors such as:
out/Release/obj.target/node/src/node_crypto.o: In function `node::crypto::RandomBytesWork(uv_work_s*)': node_crypto.cc:(.text+0x60): multiple definition of `node::crypto::RandomBytesWork(uv_work_s*)' out/Release/obj.target/node/src/node_crypto.o:node_crypto.cc:(.text+0x60): first defined here
It's caused by repetition objects in libraries and libnode.a. This CL makes those libraries guarded by 'node_target_type!="static_library"'.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
build