removed .gcda profiling info from objects list

This commit is contained in:
2026-06-09 23:15:27 +05:00
parent 33020d2b18
commit 886be342af
2 changed files with 8 additions and 12 deletions

View File

@@ -4,16 +4,12 @@
clean_dir "$OBJDIR/objects"
rm -f "$EXEC_FILE"
# copy profiling info
prof_files=$(find "$OBJDIR/profile/" -name '*.gcda')
if [ -z "$prof_files" ]; then
myprint "${YELLOW}no profiling info found"
else
myprint "${GREEN}profiling info found"
for prof_file in $prof_files; do
myprint "${GRAY}$(basename $prof_file)"
cp $prof_file "$OBJDIR/objects/"
done
# copy profiling info to $OBJDIR/objects/
prof_files=$(find "$OBJDIR/profile/" -type f,l | tr '\n' ' ')
if [ ! -z "$prof_files" ]; then
myprint "${GREEN}profiling info found, copying to $OBJDIR/objects/"
myprint "${GRAY}$prof_files"
cp $prof_files "$OBJDIR/objects/"
fi
[ ! -z "$SRC_C" ] && compile_c "$CMP_C" "$STD_C" "$WARN_C" "$C_ARGS" "$INCLUDE" "$SRC_C"

View File

@@ -226,7 +226,7 @@ function pack_static_lib {
local outfile="$1"
myprint "${BLUE}outfile: ${GRAY}$outfile"
local objects=$(find $OBJDIR/objects -type f,l | tr '\n' ' ')
local objects=$(find $OBJDIR/objects \( -name "*.o" -o -name "*.a" \) -type f,l | tr '\n' ' ')
myprint "${BLUE}objects: ${GRAY}$objects"
if [ -z "$objects" ]; then
error "no compiled objects found"
@@ -252,7 +252,7 @@ function link {
myprint "${BLUE}args: ${GRAY}$args"
myprint "${BLUE}outfile: ${GRAY}$outfile"
local objects=$(find $OBJDIR/objects -type f,l | tr '\n' ' ')
local objects=$(find $OBJDIR/objects \( -name "*.o" -o -name "*.a" \) -type f,l | tr '\n' ' ')
myprint "${BLUE}objects: ${GRAY}$objects"
if [ -z "$objects" ]; then
error "no compiled objects found"