Skip to content

Commit 5c4c9e6

Browse files
committed
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
1 parent 24f6317 commit 5c4c9e6

File tree

146 files changed

+264
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+264
-219
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS = -mthumb
2+
CFLAGS_EXTRAS := -mthumb
33

44
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS = -mthumb
2+
CFLAGS_EXTRAS := -mthumb
33

44
include Makefile.rules
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
OBJC_SOURCES := call-throws.m
2-
2+
LD_EXTRAS := -framework Foundation
33
include Makefile.rules
4-
LDFLAGS += -framework Foundation
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
OBJC_SOURCES := main.m
2-
2+
LD_EXTRAS := -framework Foundation
33
include Makefile.rules
4-
LDFLAGS += -framework Foundation
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS += -std=c99
2+
CFLAGS_EXTRAS := -std=c99
33

44
include Makefile.rules

lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# system headers.
44
NO_TEST_COMMON_H := 1
55

6-
CXXFLAGS += -I $(SRCDIR)/root/usr/include/c++/include/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++ -nostdlib++
6+
CXXFLAGS_EXTRAS := -I $(SRCDIR)/root/usr/include/c++/include/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++ -nostdlib++
77
CXX_SOURCES := main.cpp
8+
89
include Makefile.rules
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
OBJC_SOURCES := main.m
2-
2+
LD_EXTRAS := -framework Cocoa
33
include Makefile.rules
4-
LDFLAGS += -framework Cocoa
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
OBJCXX_SOURCES := main.mm util.mm
2-
include Makefile.rules
32

4-
LDFLAGS += -framework Foundation
3+
4+
LD_EXTRAS := -framework Foundation
5+
include Makefile.rules
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
OBJC_SOURCES := main.m
22

3-
include Makefile.rules
4-
LDFLAGS += -framework Foundation -framework CloudKit
53

4+
LD_EXTRAS := -framework Foundation -framework CloudKit
5+
6+
include Makefile.rules

lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
OBJC_SOURCES := main.m
22

3+
4+
LD_EXTRAS := -framework Foundation
35
include Makefile.rules
4-
LDFLAGS += -framework Foundation
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CXX_SOURCES := main.cpp
2-
CXXFLAGS += -std=c++11
2+
CXXFLAGS_EXTRAS := -std=c++11
3+
34

45
include Makefile.rules
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
OBJC_SOURCES := main.m foo.m
22

3-
include Makefile.rules
43

5-
LDFLAGS += -framework Foundation
4+
5+
LD_EXTRAS := -framework Foundation
6+
include Makefile.rules

lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CFLAGS_EXTRAS += -std=c99
1+
CFLAGS_EXTRAS := -std=c99
22
LD_FLAGS := -dynamiclib
33
include Makefile.rules
44

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
OBJC_SOURCES := main.m
22

3-
CFLAGS_EXTRAS += -g0 # No debug info.
3+
CFLAGS_EXTRAS := -g0 # No debug info.
44
MAKE_DSYM := NO
55

6-
include Makefile.rules
76

8-
LDFLAGS += -framework Foundation
7+
8+
LD_EXTRAS := -framework Foundation
9+
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS += -std=c99
2+
CFLAGS_EXTRAS := -std=c99
33

44
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CXX_SOURCES := main.cpp
22

3-
CFLAGS_EXTRAS += -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
3+
CFLAGS_EXTRAS := -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
44

55
include Makefile.rules
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CXX_SOURCES := main.cpp
22

3-
CFLAGS_EXTRAS += -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
3+
CFLAGS_EXTRAS := -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
44

55
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS += -std=c99
2+
CFLAGS_EXTRAS := -std=c99
33

44
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS += -std=c99
2+
CFLAGS_EXTRAS := -std=c99
33

44
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS += -std=c99
2+
CFLAGS_EXTRAS := -std=c99
33

44
include Makefile.rules
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS += -std=c99 -gcolumn-info
2+
CFLAGS_EXTRAS := -std=c99 -gcolumn-info
33

44
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS += -std=c99
2+
CFLAGS_EXTRAS := -std=c99
33

44
include Makefile.rules
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
CXX_SOURCES := main.cpp
22

33
ifneq (,$(findstring icc,$(CC)))
4-
CXXFLAGS += -debug inline-debug-info
4+
CXXFLAGS_EXTRAS := -debug inline-debug-info
55
endif
66

7+
78
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
C_SOURCES := main.c
22

33
ifneq (,$(findstring icc,$(CC)))
4-
CFLAGS += -debug inline-debug-info
4+
CFLAGS_EXTRAS := -debug inline-debug-info
55
endif
66

77
include Makefile.rules
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
CXX_SOURCES := main.cpp
22

33
ifneq (,$(findstring icc,$(CC)))
4-
CXXFLAGS += -debug inline-debug-info
4+
CXXFLAGS_EXTRAS := -debug inline-debug-info
55
endif
66

7+
78
include Makefile.rules
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
CXX_SOURCES := main.cpp
22

33
ifneq (,$(findstring icc,$(CC)))
4-
CXXFLAGS += -debug inline-debug-info
4+
CXXFLAGS_EXTRAS := -debug inline-debug-info
55
endif
66

7+
78
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
C_SOURCES := main.c
22

33
ifneq (,$(findstring icc,$(CC)))
4-
CFLAGS += -debug inline-debug-info
4+
CFLAGS_EXTRAS := -debug inline-debug-info
55
endif
66

77
include Makefile.rules
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
OBJC_SOURCES := main.m
22

3-
include Makefile.rules
43

5-
LDFLAGS += -framework Foundation
4+
5+
LD_EXTRAS := -framework Foundation
6+
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
C_SOURCES := main.c
22

33
ifneq (,$(findstring icc,$(CC)))
4-
CFLAGS += -debug inline-debug-info
4+
CFLAGS_EXTRAS := -debug inline-debug-info
55
endif
66

77
include Makefile.rules
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
C_SOURCES := main.c
2-
CFLAGS_EXTRAS += -std=c99
2+
CFLAGS_EXTRAS := -std=c99
33

44
include Makefile.rules
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
CXX_SOURCES := main.cpp
22

33
ifneq (,$(findstring icc,$(CC)))
4-
CXXFLAGS += -debug inline-debug-info
4+
CXXFLAGS_EXTRAS := -debug inline-debug-info
55
endif
66

7+
78
include Makefile.rules
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
OBJCXX_SOURCES := main.mm
22

3-
CFLAGS_EXTRAS += -w
3+
CFLAGS_EXTRAS := -w
4+
45

5-
include Makefile.rules
66

7-
LDFLAGS += -framework Foundation
7+
LD_EXTRAS := -framework Foundation
8+
include Makefile.rules
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
CXX_SOURCES := main.cpp
2-
2+
LD_EXTRAS := -framework Accelerate
33
include Makefile.rules
44

5-
LDFLAGS += -framework Accelerate
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
OBJC_SOURCES := main.m
22

3-
CFLAGS_EXTRAS += -w
3+
CFLAGS_EXTRAS := -w
4+
45

5-
include Makefile.rules
66

7-
LDFLAGS += -framework Foundation
7+
LD_EXTRAS := -framework Foundation
8+
include Makefile.rules
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
OBJC_SOURCES := main.m
22

3-
CFLAGS_EXTRAS += -w
3+
CFLAGS_EXTRAS := -w
4+
45

5-
include Makefile.rules
66

7-
LDFLAGS += -framework Foundation
7+
LD_EXTRAS := -framework Foundation
8+
include Makefile.rules
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
OBJC_SOURCES := main.m
22

3-
CFLAGS_EXTRAS += -w
3+
CFLAGS_EXTRAS := -w
4+
45

5-
include Makefile.rules
66

7-
LDFLAGS += -framework Foundation
7+
LD_EXTRAS := -framework Foundation
8+
include Makefile.rules
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
OBJC_SOURCES := main.m
22

3-
CFLAGS_EXTRAS += -w
3+
CFLAGS_EXTRAS := -w
4+
45

5-
include Makefile.rules
66

7-
LDFLAGS += -framework Foundation
7+
LD_EXTRAS := -framework Foundation
8+
include Makefile.rules
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
CXX_SOURCES := main.cpp
22
USE_LIBSTDCPP := 0
33

4-
include Makefile.rules
54

6-
CXXFLAGS += -O0
5+
6+
CXXFLAGS_EXTRAS := -O0
7+
include Makefile.rules
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CXX_SOURCES := main.cpp
2-
CXXFLAGS += -std=c++11
2+
CXXFLAGS_EXTRAS := -std=c++11
33
USE_LIBCPP := 1
4+
45
include Makefile.rules
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
CXX_SOURCES := main.cpp
2-
CXXFLAGS += -std=c++11
2+
CXXFLAGS_EXTRAS := -std=c++11
33
USE_LIBCPP := 1
4+
45
include Makefile.rules
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
CXX_SOURCES := main.cpp
2-
CXXFLAGS += -std=c++11
2+
CXXFLAGS_EXTRAS := -std=c++11
3+
34
include Makefile.rules

lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CXX_SOURCES := main.cpp
22

33
USE_LIBCPP := 1
4+
5+
CXXFLAGS_EXTRAS := -O0
46
include Makefile.rules
5-
CXXFLAGS += -O0

lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CXX_SOURCES := main.cpp
22

33
USE_LIBCPP := 1
4+
5+
CXXFLAGS_EXTRAS := -O0
46
include Makefile.rules
5-
CXXFLAGS += -O0

lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CXX_SOURCES := main.cpp
22

33
USE_LIBCPP := 1
4+
5+
CXXFLAGS_EXTRAS := -O0
46
include Makefile.rules
5-
CXXFLAGS += -O0

lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CXX_SOURCES := main.cpp
22

33
USE_LIBCPP := 1
4+
5+
CXXFLAGS_EXTRAS := -O0
46
include Makefile.rules
5-
CXXFLAGS += -O0

lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CXX_SOURCES := main.cpp
22

33
USE_LIBCPP := 1
4+
5+
CXXFLAGS_EXTRAS := -O0
46
include Makefile.rules
5-
CXXFLAGS += -O0

lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CXX_SOURCES := main.cpp
22

33
USE_LIBCPP := 1
4+
5+
CXXFLAGS_EXTRAS := -O0
46
include Makefile.rules
5-
CXXFLAGS += -O0

lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CXX_SOURCES := main.cpp
22

33
USE_LIBCPP := 1
4+
5+
CXXFLAGS_EXTRAS := -std=c++17 -fno-exceptions
46
include Makefile.rules
5-
CXXFLAGS += -std=c++17 -fno-exceptions

lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
CXX_SOURCES := main.cpp
22

33
USE_LIBCPP := 1
4+
5+
CXXFLAGS_EXTRAS := -O0
46
include Makefile.rules
5-
CXXFLAGS += -O0

0 commit comments

Comments
 (0)