diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-09-25 00:36:00 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-09-25 00:36:00 +0000 |
commit | 5c4c9e61725526e1e7afca87b395a0efd2aeabfd (patch) | |
tree | 174ed56ba52ef911ec05e5f15d607a5004c34eca /lldb/packages/Python/lldbsuite/test/lang/objc | |
parent | 24f63176342dabc35582cb9e7574d288c7779272 (diff) | |
download | bcm5719-llvm-5c4c9e61725526e1e7afca87b395a0efd2aeabfd.tar.gz bcm5719-llvm-5c4c9e61725526e1e7afca87b395a0efd2aeabfd.zip |
Canonicalize variable usage in testsuite Makefiles
This test streamlines our use of variables that are expected by
Makefile.rules throughout the test suite. Mostly it replaced
potentially dangerous overrides and updates of variables like CFLAGS
with safe assignments to variables reserved for this purpose like
CFLAGS_EXTRAS.
Differential Revision: https://reviews.llvm.org/D67984
llvm-svn: 372795
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/objc')
33 files changed, 54 insertions, 59 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile index 48c06c712cd..df76ed3069f 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := ivars-in-blocks.m main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile index 377a1a0373a..876340159d9 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile @@ -1,7 +1,8 @@ OBJCXX_SOURCES := main.mm -CFLAGS_EXTRAS += -w +CFLAGS_EXTRAS := -w + -include Makefile.rules -LDFLAGS += -framework Foundation +LD_EXTRAS := -framework Foundation +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile index b9d3a985fbe..cfae251ead4 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile @@ -2,6 +2,7 @@ DYLIB_NAME := Container DYLIB_OBJC_SOURCES := Container.m OBJC_SOURCES := main.m -include Makefile.rules -LDFLAGS += -framework Foundation + +LD_EXTRAS := -framework Foundation +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile index 38ef76b8d58..e95ebd94a94 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile @@ -1,6 +1,7 @@ OBJC_SOURCES := main.m my-base.m #OBJC_SOURCES := const-strings.m -include Makefile.rules -LDFLAGS += -framework Foundation + +LD_EXTRAS := -framework Foundation +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile index 32d01e345df..afecbf96948 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile index 843400a08cf..ba7e23acaba 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile @@ -1,18 +1,5 @@ -CC ?= clang -ifeq "$(ARCH)" "" - ARCH = x86_64 -endif - -ifeq "$(OS)" "" - OS = $(shell uname -s) -endif - -CFLAGS ?= -g -O0 +CFLAGS := -g -O0 CFLAGS_NO_DEBUG = -ifeq "$(OS)" "Darwin" - CFLAGS += -arch $(ARCH) - CFLAGS_NO_DEBUG += -arch $(ARCH) -endif all: aout diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile index c6bd24d99ad..3b2bd504c89 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile @@ -1,5 +1,5 @@ OBJC_SOURCES := main.m -CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) +CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile index c32d0fb655d..abb36e281b2 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile @@ -1,6 +1,5 @@ OBJC_SOURCES := main.m myModule.m +CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) +LD_EXTRAS := -framework Foundation include Makefile.rules - -CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) -LDFLAGS += -framework Foundation diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile index 78d1c67dec1..b4afe2cb3e8 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile @@ -2,6 +2,6 @@ C_SOURCES := myModule.c OBJC_SOURCES := main.m -include Makefile.rules +CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(BUILDDIR) -CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(PWD) +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile index 7202932571d..37dd8f40a9d 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile @@ -1,5 +1,6 @@ OBJC_SOURCES := main.m -include Makefile.rules -LDFLAGS += -framework Foundation + +LD_EXTRAS := -framework Foundation +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile index 32d01e345df..afecbf96948 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile index e0c4678f5d9..e6db3dee37b 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := class.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile index 8677e226556..a34977712c3 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := dynamic-value.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile index 701fd53ab27..5408f4199f2 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := objc-ivar-offsets.m main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile index 32c0f4aef40..a218ce37e61 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile @@ -1,5 +1,5 @@ OBJC_SOURCES := main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation all: a.out.stripped diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile index 7202932571d..37dd8f40a9d 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile @@ -1,5 +1,6 @@ OBJC_SOURCES := main.m -include Makefile.rules -LDFLAGS += -framework Foundation + +LD_EXTRAS := -framework Foundation +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile index 9be48503826..5fb128dcc7e 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile @@ -1,6 +1,6 @@ OBJC_SOURCES := main.m CFLAGS ?= -arch $(ARCH) -g -O2 -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile index 32d01e345df..afecbf96948 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile index 32d01e345df..afecbf96948 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile index 5ba751c1567..0ad7e356316 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile @@ -1,5 +1,5 @@ OBJC_SOURCES := static.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation default: a.out.stripped diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile index 1c9e629925f..954dea47b32 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := static.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile index 09e6a5ea338..9906470d530 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := stepping-tests.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile index 1db77a61ecd..d059a5c1c29 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := test.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile index 1db77a61ecd..d059a5c1c29 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := test.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile index e0c4678f5d9..e6db3dee37b 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := class.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile index 32d01e345df..afecbf96948 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile index 1d34d4ed2ff..2eab56265f5 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := blocked.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile index 7202932571d..37dd8f40a9d 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile @@ -1,5 +1,6 @@ OBJC_SOURCES := main.m -include Makefile.rules -LDFLAGS += -framework Foundation + +LD_EXTRAS := -framework Foundation +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile index 7202932571d..37dd8f40a9d 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile @@ -1,5 +1,6 @@ OBJC_SOURCES := main.m -include Makefile.rules -LDFLAGS += -framework Foundation + +LD_EXTRAS := -framework Foundation +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile index 7202932571d..37dd8f40a9d 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile @@ -1,5 +1,6 @@ OBJC_SOURCES := main.m -include Makefile.rules -LDFLAGS += -framework Foundation + +LD_EXTRAS := -framework Foundation +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile index 1b3732be252..f1498efac1d 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := Bar.m Foo.m main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile index 32d01e345df..afecbf96948 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile @@ -1,4 +1,4 @@ OBJC_SOURCES := main.m -LDFLAGS = $(CFLAGS) -lobjc -framework Foundation +LD_EXTRAS := -lobjc -framework Foundation include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile index 7202932571d..37dd8f40a9d 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile @@ -1,5 +1,6 @@ OBJC_SOURCES := main.m -include Makefile.rules -LDFLAGS += -framework Foundation + +LD_EXTRAS := -framework Foundation +include Makefile.rules |