Add flag to Makefile
authorLukas Jiriste <ljiriste@student.42prague.com>
Fri, 25 Oct 2024 10:36:19 +0000 (12:36 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Fri, 25 Oct 2024 10:36:19 +0000 (12:36 +0200)
The 42 computers have c++ pointed to clang++. Clang obscures the
std::string type in gdb even with -g flag, but the option
-fno-limit-debug-info makes std::string legible.
So I added he flag but it is not used in g++ which could be hiding under
c++, so I've rewritten the Makefile to explicitly use clang++.

ex01/Makefile

index 7a50fdcbc870ae9bf40a35e0046eaeaf6ac4ec9b..ca73b439eae44ad181140cc909c13387799dd7d1 100644 (file)
@@ -1,8 +1,8 @@
-CC := c++
+CC := clang++
 CFLAGS = -std=c++98 -Wall -Wextra -Werror -Wpedantic
 
 ifneq ("$(wildcard .debug)","")
-       CFLAGS += -g
+       CFLAGS += -g -fno-limit-debug-info
 endif
 
 RM := rm -f