From f5809d8e35dbbd826ce72a225cd5694dc9252e31 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 8 Nov 2017 09:41:09 +0100 Subject: build: fix cctest compilation Currently the cctest target compiles sources files even though they are compiled for the node target. This is my fault as when I worked on the task of getting the cctest to use the object files from the node target I missed a few sources that were being included from node.gypi. This also effects the build time as these sources are compiled twice. This commit moves the conditions in question into the node target in node.gyp. With this commit there should be no object files in out/Release/obj.target/cctest/src/ (the path will vary depending on the operating system being used). PR-URL:https://github.com/nodejs/node/pull/16887 Reviewed-By: Ben Noordhuis --- doc/guides/writing-tests.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/guides/writing-tests.md') diff --git a/doc/guides/writing-tests.md b/doc/guides/writing-tests.md index 6868e8681c..19626799f7 100644 --- a/doc/guides/writing-tests.md +++ b/doc/guides/writing-tests.md @@ -325,6 +325,11 @@ Next add the test to the `sources` in the `cctest` target in node.gyp: ... ], ``` +Note that the only sources that should be included in the cctest target are +actual test or helper source files. There might be a need to include specific +object files that are compiled by the `node` target and this can be done by +adding them to the `libraries` section in the cctest target. + The test can be executed by running the `cctest` target: ```console $ make cctest -- cgit v1.2.3