File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,14 @@ LIB_LIST=$@
19
19
# unit name collisions which affect linking against the final artefact. For more
20
20
# details, please look at https://github.com/diffblue/cbmc/issues/7586 .
21
21
22
+ # Create a temporary folder for this script to work in.
23
+ rm -rf add_dependencies_tmp
24
+ mkdir add_dependencies_tmp
25
+ cd add_dependencies_tmp
26
+
27
+ # The full path of the current "root" directory
28
+ WORKING_DIR=$( pwd)
29
+
22
30
# For each library to add:
23
31
for lib in ${LIB_LIST} ; do
24
32
# We will unpack and rename all .o of dependent libraries marking them with
@@ -33,18 +41,18 @@ for lib in ${LIB_LIST}; do
33
41
# Unpack the library
34
42
${AR_COMMAND} -x ${lib}
35
43
36
- # Rename all object file in the library prepending "${LIBNAME}_" to avoid
37
- # clashes.
44
+ # Rename all object files in the library prepending "${LIBNAME}_" to avoid
45
+ # clashes, and move to the "root" folder .
38
46
for obj in * .o; do
39
- mv ${obj} " ${LIBNAME} _${obj} "
47
+ mv ${obj} " ${WORKING_DIR} / ${ LIBNAME} _${obj} "
40
48
done
41
49
42
50
# Move back to the working directory.
43
- cd ..
51
+ cd " ${WORKING_DIR} "
44
52
done
45
53
46
54
# Append all the unpacked files to the destination library
47
- ${AR_COMMAND} -rcs ${DESTINATION} ** / * .o
55
+ ${AR_COMMAND} -rcs ${DESTINATION} * .o
48
56
49
57
# TODO: See if we need to do some cleanup in order to save cache space for
50
58
# Github actions runners.
You can’t perform that action at this time.
0 commit comments