File tree 7 files changed +86
-53
lines changed
backend/cn/lib/testGeneration
7 files changed +86
-53
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,8 @@ let link ~filename_base =
115
115
" "
116
116
else
117
117
" " ^ filename_base ^ " -exec.o cn.o" );
118
- " \" ${RUNTIME_PREFIX}/libcn.a\" "
118
+ " \" ${RUNTIME_PREFIX}/libcn_exec.a\" " ;
119
+ " \" ${RUNTIME_PREFIX}/libcn_test.a\" "
119
120
]
120
121
@ cc_flags () ))
121
122
" Linked C *.o files."
Original file line number Diff line number Diff line change 1
- ; (include_subdirs unqualified)
2
-
3
- (rule
4
- (target libcn.a)
5
- (deps
6
- (:headers
7
- (glob_files include/cn-executable/*.h)
8
- (glob_files include/cn-testing/*.h))
9
- (:src
10
- (glob_files src/cn-executable/*.c)
11
- (glob_files src/cn-testing/*.c)))
12
- (action
13
- (progn
14
- (run cc -Iinclude/ -c -g %{src})
15
- (run
16
- ar
17
- -rcs
18
- %{target}
19
- alloc.o
20
- hash_table.o
21
- utils.o
22
- gen_alloc.o
23
- backtrack.o
24
- uniform.o
25
- urn.o
26
- rand.o
27
- size.o
28
- test.o))))
29
-
30
- (install
31
- (files
32
- (include/cn-executable/alloc.h as runtime/include/cn-executable/alloc.h)
33
- (include/cn-executable/hash_table.h
34
- as
35
- runtime/include/cn-executable/hash_table.h)
36
- (include/cn-executable/utils.h as runtime/include/cn-executable/utils.h)
37
- (include/cn-testing/alloc.h as runtime/include/cn-testing/alloc.h)
38
- (include/cn-testing/backtrack.h as runtime/include/cn-testing/backtrack.h)
39
- (include/cn-testing/uniform.h as runtime/include/cn-testing/uniform.h)
40
- (include/cn-testing/urn.h as runtime/include/cn-testing/urn.h)
41
- (include/cn-testing/rand.h as runtime/include/cn-testing/rand.h)
42
- (include/cn-testing/size.h as runtime/include/cn-testing/size.h)
43
- (include/cn-testing/dsl.h as runtime/include/cn-testing/dsl.h)
44
- (include/cn-testing/result.h as runtime/include/cn-testing/result.h)
45
- (include/cn-testing/test.h as runtime/include/cn-testing/test.h)
46
- (include/cn-testing/prelude.h as runtime/include/cn-testing/prelude.h)
47
- (libcn.a as runtime/libcn.a))
48
- (section lib)
49
- (package cn))
50
-
51
1
(install
52
2
(files
53
3
(libexec/cn-runtime-single-file.sh
Original file line number Diff line number Diff line change
1
+ ; With Dune >= 3.11
2
+ ; (install
3
+ ; (files
4
+ ; (glob_files
5
+ ; (cn-executable/*.h with_prefix runtime/include/cn-executable))
6
+ ; (glob_files
7
+ ; (cn-testing/*.h with_prefix runtime/include/cn-testing)))
8
+ ; (section lib)
9
+ ; (package cn))
10
+
11
+ (install
12
+ (files
13
+ ;
14
+ (cn-executable/alloc.h as runtime/include/cn-executable/alloc.h)
15
+ (cn-executable/hash_table.h as runtime/include/cn-executable/hash_table.h)
16
+ (cn-executable/utils.h as runtime/include/cn-executable/utils.h)
17
+ ;
18
+ (cn-testing/alloc.h as runtime/include/cn-testing/alloc.h)
19
+ (cn-testing/backtrack.h as runtime/include/cn-testing/backtrack.h)
20
+ (cn-testing/dsl.h as runtime/include/cn-testing/dsl.h)
21
+ (cn-testing/prelude.h as runtime/include/cn-testing/prelude.h)
22
+ (cn-testing/rand.h as runtime/include/cn-testing/rand.h)
23
+ (cn-testing/result.h as runtime/include/cn-testing/result.h)
24
+ (cn-testing/size.h as runtime/include/cn-testing/size.h)
25
+ (cn-testing/test.h as runtime/include/cn-testing/test.h)
26
+ (cn-testing/uniform.h as runtime/include/cn-testing/uniform.h)
27
+ (cn-testing/urn.h as runtime/include/cn-testing/urn.h))
28
+ (section lib)
29
+ (package cn))
Original file line number Diff line number Diff line change
1
+ (rule
2
+ (target libcn_exec.a)
3
+ (deps
4
+ (:headers
5
+ (glob_files ../include/cn-executable/*.h))
6
+ (:src
7
+ (glob_files ../src/cn-executable/*.c)))
8
+ (action
9
+ (progn
10
+ (run mkdir -p cn-executable)
11
+ (chdir
12
+ cn-executable
13
+ (run cc -I ../../include/ -c -g %{src}))
14
+ (run
15
+ ar
16
+ -rcs
17
+ %{target}
18
+ cn-executable/alloc.o
19
+ cn-executable/hash_table.o
20
+ cn-executable/utils.o))))
21
+
22
+ (rule
23
+ (target libcn_test.a)
24
+ (deps
25
+ (:headers
26
+ (glob_files ../include/cn-executable/*.h)
27
+ (glob_files ../include/cn-testing/*.h))
28
+ (:src
29
+ (glob_files ../src/cn-testing/*.c)))
30
+ (action
31
+ (progn
32
+ (run mkdir -p cn-testing)
33
+ (chdir
34
+ cn-testing
35
+ (run cc -I../../include/ -c -g %{src}))
36
+ (run
37
+ ar
38
+ -rcs
39
+ %{target}
40
+ cn-testing/alloc.o
41
+ cn-testing/backtrack.o
42
+ cn-testing/rand.o
43
+ cn-testing/size.o
44
+ cn-testing/test.o
45
+ cn-testing/uniform.o
46
+ cn-testing/urn.o))))
47
+
48
+ (install
49
+ (files
50
+ (libcn_exec.a as runtime/libcn_exec.a)
51
+ (libcn_test.a as runtime/libcn_test.a))
52
+ (section lib)
53
+ (package cn))
Original file line number Diff line number Diff line change 77
77
fi
78
78
79
79
# Link
80
- if cc ${UBSAN} " -I${RUNTIME_PREFIX} /include" -o " ${INPUT_BASENAME} -exec-output.bin" ./* .o " ${RUNTIME_PREFIX} /libcn .a" ; then
80
+ if cc ${UBSAN} " -I${RUNTIME_PREFIX} /include" -o " ${INPUT_BASENAME} -exec-output.bin" ./* .o " ${RUNTIME_PREFIX} /libcn_exec .a" ; then
81
81
[ " ${QUIET} " ] || echo " Linked C .o files."
82
82
else
83
83
echo_and_err " Failed to link .o files in ${EXEC_DIR} ."
File renamed without changes.
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def gen_link_cmd(input_basename, instrumented):
112
112
link_cmd += "-I " + "cn_uninstr_defs.h "
113
113
link_cmd += "-o " + bin_file + o_files
114
114
if instrumented :
115
- link_cmd += runtime_prefix + "/libcn .a"
115
+ link_cmd += runtime_prefix + "/libcn_exec .a"
116
116
return link_cmd
117
117
118
118
def gen_exec_cmd (input_basename , instrumented ):
You can’t perform that action at this time.
0 commit comments