Skip to content

Commit f5a9b16

Browse files
committed
build: enable cctest to use generated objects
This commit tries to make it simpler to add unit tests (cctest) for code that needs to test node core funtionality but that might not be appropriate as an addon or a JavaScript test. An example of this could be adding functionality targeted for situations when Node itself is embedded. Currently it was not as easy, or efficient, as one would have hoped to add such tests. The object output directories vary for different operating systems which we need to link to so that we don't have an additional compilation step. Refs: #9163
1 parent 5a71cb6 commit f5a9b16

File tree

7 files changed

+506
-357
lines changed

7 files changed

+506
-357
lines changed

common.gypi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
['OS == "win"', {
3939
'os_posix': 0,
4040
'v8_postmortem_support%': 'false',
41+
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
42+
'V8_BASE': '<(PRODUCT_DIR)/lib/v8_libbase.lib',
4143
}, {
4244
'os_posix': 1,
4345
'v8_postmortem_support%': 'true',
@@ -51,8 +53,8 @@
5153
'OBJ_DIR': '<(PRODUCT_DIR)/obj',
5254
'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a',
5355
}, {
54-
'OBJ_DIR': '<(PRODUCT_DIR)/obj.target',
55-
'V8_BASE': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
56+
'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target',
57+
'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a',
5658
}],
5759
],
5860
}],

0 commit comments

Comments
 (0)