[Lldb-commits] [lldb] cbdd92b - Modernize TestWeakSymbols Makefile
Fred Riss via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 7 14:54:27 PST 2019
Author: Fred Riss
Date: 2019-11-07T14:53:52-08:00
New Revision: cbdd92be8a57e204aeb346c02ec6c4f440499679
URL: https://github.com/llvm/llvm-project/commit/cbdd92be8a57e204aeb346c02ec6c4f440499679
DIFF: https://github.com/llvm/llvm-project/commit/cbdd92be8a57e204aeb346c02ec6c4f440499679.diff
LOG: Modernize TestWeakSymbols Makefile
Added:
Modified:
lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
index c8b38907ac92..6fd8133312ad 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
@@ -1,25 +1,20 @@
-CFLAGS_EXTRAS := -std=c99
-LD_FLAGS := -dynamiclib
-include Makefile.rules
-
-all: a.out dylib missing
+C_SOURCES := main.c
+CFLAGS_EXTRAS := -std=c99 -fmodules
+LD_EXTRAS := -ldylib -L.
-dylib: dylib.o
- $(CC) $(LD_FLAGS) -o libdylib.dylib dylib.o
-
-missing: dylib2.o
- mkdir hidden
- $(CC) $(LD_FLAGS) -o hidden/libdylib.dylib dylib2.o
+all: a.out hidden/libdylib.dylib
-a.out: main.o dylib missing
- $(CC) $(CFLAGS) -L. -ldylib main.o
+a.out: libdylib.dylib
-dylib.o: dylib.h $(SRCDIR)/dylib.c
- $(CC) -DHAS_THEM $(CFLAGS) -c $(SRCDIR)/dylib.c
-
-dylib2.o: dylib.h $(SRCDIR)/dylib.c
- $(CC) $(CFLAGS) -c $(SRCDIR)/dylib.c -o dylib2.o
+include Makefile.rules
-main.o: dylib.h $(SRCDIR)/main.c
- $(CC) $(CFLAGS) -c $(SRCDIR)/main.c -fmodules -fmodules-cache-path=$(CLANG_MODULE_CACHE_DIR)
+libdylib.dylib: dylib.c
+ $(MAKE) -C $(BUILDDIR) -f $(MAKEFILE_RULES) \
+ C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
+ CFLAGS_EXTRAS=-DHAS_THEM LD_EXTRAS=-dynamiclib
+hidden/libdylib.dylib:
+ mkdir hidden
+ $(MAKE) -C $(BUILDDIR)/hidden -f $(MAKEFILE_RULES) \
+ C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
+ LD_EXTRAS=-dynamiclib
More information about the lldb-commits
mailing list