summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2019-09-25 00:36:00 +0000
committerAdrian Prantl <aprantl@apple.com>2019-09-25 00:36:00 +0000
commit5c4c9e61725526e1e7afca87b395a0efd2aeabfd (patch)
tree174ed56ba52ef911ec05e5f15d607a5004c34eca /lldb/packages/Python/lldbsuite/test
parent24f63176342dabc35582cb9e7574d288c7779272 (diff)
downloadbcm5719-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')
-rw-r--r--lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile1
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile6
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile6
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile3
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile4
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile15
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile4
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/macosx/order/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/make/Makefile.rules2
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile6
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile7
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/sample_test/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile2
-rw-r--r--lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile2
146 files changed, 264 insertions, 219 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile b/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
index dac447e5c70..f8f686a3455 100644
--- a/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS = -mthumb
+CFLAGS_EXTRAS := -mthumb
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile b/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
index 0d6bbe2df01..3f8e5597f7d 100644
--- a/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS = -mthumb
+CFLAGS_EXTRAS := -mthumb
include Makefile.rules \ No newline at end of file
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile
index 33746217ecb..becb2f09658 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile
@@ -1,4 +1,3 @@
OBJC_SOURCES := call-throws.m
-
+LD_EXTRAS := -framework Foundation
include Makefile.rules
-LDFLAGS += -framework Foundation
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile
index 2f36b673031..a3198db9e8e 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile
@@ -1,4 +1,3 @@
OBJC_SOURCES := main.m
-
+LD_EXTRAS := -framework Foundation
include Makefile.rules
-LDFLAGS += -framework Foundation
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile
index aa5f222c08e..695335e068c 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
index 4aa2b432f12..019a94d53a9 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
@@ -3,6 +3,7 @@
# system headers.
NO_TEST_COMMON_H := 1
-CXXFLAGS += -I $(SRCDIR)/root/usr/include/c++/include/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++ -nostdlib++
+CXXFLAGS_EXTRAS := -I $(SRCDIR)/root/usr/include/c++/include/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++ -nostdlib++
CXX_SOURCES := main.cpp
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile
index 780b2660cd0..b46bd7f39a9 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile
@@ -1,4 +1,3 @@
OBJC_SOURCES := main.m
-
+LD_EXTRAS := -framework Cocoa
include Makefile.rules
-LDFLAGS += -framework Cocoa
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile
index 9267f734396..4d12ff1b43e 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile
@@ -1,4 +1,5 @@
OBJCXX_SOURCES := main.mm util.mm
-include Makefile.rules
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile
index add737b4752..69a2ad6b8d8 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile
@@ -1,5 +1,6 @@
OBJC_SOURCES := main.m
-include Makefile.rules
-LDFLAGS += -framework Foundation -framework CloudKit
+LD_EXTRAS := -framework Foundation -framework CloudKit
+
+include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile
index 2f36b673031..9e812e1cf78 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile
@@ -1,4 +1,5 @@
OBJC_SOURCES := main.m
+
+LD_EXTRAS := -framework Foundation
include Makefile.rules
-LDFLAGS += -framework Foundation
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
index 4b46fe22a8b..4eb417eeb57 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
@@ -1,4 +1,5 @@
CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile b/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile
index b8b1d12fe2b..c82383d9400 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile
@@ -1,5 +1,6 @@
OBJC_SOURCES := main.m foo.m
-include Makefile.rules
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
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 9786ff38a84..c8b38907ac9 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
@@ -1,4 +1,4 @@
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
LD_FLAGS := -dynamiclib
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile b/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile
index b016328910e..8248c01fe6a 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile
@@ -1,8 +1,9 @@
OBJC_SOURCES := main.m
-CFLAGS_EXTRAS += -g0 # No debug info.
+CFLAGS_EXTRAS := -g0 # No debug info.
MAKE_DSYM := NO
-include Makefile.rules
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile b/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile
index aa5f222c08e..695335e068c 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile b/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile
index 202f88e410e..5cc7382f1d9 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile
@@ -1,5 +1,5 @@
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
+CFLAGS_EXTRAS := -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile b/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile
index 202f88e410e..5cc7382f1d9 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile
@@ -1,5 +1,5 @@
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
+CFLAGS_EXTRAS := -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile b/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile
index aa5f222c08e..695335e068c 100644
--- a/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
index aa5f222c08e..695335e068c 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
index aa5f222c08e..695335e068c 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
index b6309174c4c..ad42b20df4e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99 -gcolumn-info
+CFLAGS_EXTRAS := -std=c99 -gcolumn-info
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
index aa5f222c08e..695335e068c 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
index 56bf159ec07..2c00681fa22 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
@@ -1,7 +1,8 @@
CXX_SOURCES := main.cpp
ifneq (,$(findstring icc,$(CC)))
- CXXFLAGS += -debug inline-debug-info
+ CXXFLAGS_EXTRAS := -debug inline-debug-info
endif
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
index f25c0ea8055..9645fd9cc8d 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
@@ -1,7 +1,7 @@
C_SOURCES := main.c
ifneq (,$(findstring icc,$(CC)))
- CFLAGS += -debug inline-debug-info
+ CFLAGS_EXTRAS := -debug inline-debug-info
endif
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
index 56bf159ec07..2c00681fa22 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
@@ -1,7 +1,8 @@
CXX_SOURCES := main.cpp
ifneq (,$(findstring icc,$(CC)))
- CXXFLAGS += -debug inline-debug-info
+ CXXFLAGS_EXTRAS := -debug inline-debug-info
endif
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
index 56bf159ec07..2c00681fa22 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
@@ -1,7 +1,8 @@
CXX_SOURCES := main.cpp
ifneq (,$(findstring icc,$(CC)))
- CXXFLAGS += -debug inline-debug-info
+ CXXFLAGS_EXTRAS := -debug inline-debug-info
endif
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
index f25c0ea8055..9645fd9cc8d 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
@@ -1,7 +1,7 @@
C_SOURCES := main.c
ifneq (,$(findstring icc,$(CC)))
- CFLAGS += -debug inline-debug-info
+ CFLAGS_EXTRAS := -debug inline-debug-info
endif
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile
index 7202932571d..37dd8f40a9d 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/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/functionalities/breakpoint/require_hw_breakpoints/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
index f25c0ea8055..9645fd9cc8d 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
@@ -1,7 +1,7 @@
C_SOURCES := main.c
ifneq (,$(findstring icc,$(CC)))
- CFLAGS += -debug inline-debug-info
+ CFLAGS_EXTRAS := -debug inline-debug-info
endif
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
index aa5f222c08e..695335e068c 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
index 56bf159ec07..2c00681fa22 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
@@ -1,7 +1,8 @@
CXX_SOURCES := main.cpp
ifneq (,$(findstring icc,$(CC)))
- CXXFLAGS += -debug inline-debug-info
+ CXXFLAGS_EXTRAS := -debug inline-debug-info
endif
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile
index 377a1a0373a..876340159d9 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/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/functionalities/data-formatter/compactvectors/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
index 86bbe461026..a537b994079 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
@@ -1,5 +1,4 @@
CXX_SOURCES := main.cpp
-
+LD_EXTRAS := -framework Accelerate
include Makefile.rules
-LDFLAGS += -framework Accelerate \ No newline at end of file
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
index 03b57891386..8b322ff320b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
@@ -1,7 +1,8 @@
OBJC_SOURCES := main.m
-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/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
index 03b57891386..8b322ff320b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
@@ -1,7 +1,8 @@
OBJC_SOURCES := main.m
-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/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
index 03b57891386..8b322ff320b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
@@ -1,7 +1,8 @@
OBJC_SOURCES := main.m
-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/functionalities/data-formatter/data-formatter-proper-plurals/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
index 03b57891386..8b322ff320b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
@@ -1,7 +1,8 @@
OBJC_SOURCES := main.m
-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/functionalities/data-formatter/data-formatter-skip-summary/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
index 720d1b1ca5a..6bfb97cd2c2 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
@@ -1,6 +1,7 @@
CXX_SOURCES := main.cpp
USE_LIBSTDCPP := 0
-include Makefile.rules
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
index 22307c41c1c..b016f006747 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
@@ -1,4 +1,5 @@
CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
USE_LIBCPP := 1
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
index 22307c41c1c..b016f006747 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
@@ -1,4 +1,5 @@
CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
USE_LIBCPP := 1
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
index 29c68ae5740..e78030cbf75 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
index 4a33784693a..564cbada74e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -O0
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
index 4a33784693a..564cbada74e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -O0
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
index 4a33784693a..564cbada74e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -O0
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
index 4a33784693a..564cbada74e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -O0
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
index 4a33784693a..564cbada74e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -O0
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
index 4a33784693a..564cbada74e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -O0
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
index 5ad5241858d..23496eb2065 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -std=c++17 -fno-exceptions
include Makefile.rules
-CXXFLAGS += -std=c++17 -fno-exceptions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
index 4a33784693a..564cbada74e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -O0
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
index 8b7b61c59c0..c7c91da728d 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -std=c++11 -O0
include Makefile.rules
-CXXFLAGS += -std=c++11 -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
index 442886ce40f..913a52fb191 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
@@ -3,8 +3,7 @@ CXX_SOURCES := main.cpp
# Work around "exception specification in declaration does not match previous
# declaration" errors present in older libc++ releases. This error was fixed in
# the 3.8 release.
-CFLAGS_EXTRAS += -fno-exceptions
+CFLAGS_EXTRAS := -fno-exceptions
USE_LIBCPP := 1
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
index 3fc4d802718..7eeff740780 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -std=c++17
include Makefile.rules
-CXXFLAGS += -std=c++17
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
index c7df6a4cbf9..d87cf7d4027 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
@@ -1,5 +1,4 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
index 4a33784693a..564cbada74e 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
@@ -1,5 +1,6 @@
CXX_SOURCES := main.cpp
USE_LIBCPP := 1
+
+CXXFLAGS_EXTRAS := -O0
include Makefile.rules
-CXXFLAGS += -O0
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
index 7d43aa33e9a..c825977b1a5 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
@@ -1,6 +1,6 @@
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -O0
+CFLAGS_EXTRAS := -O0
USE_LIBSTDCPP := 1
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
index 7d43aa33e9a..c825977b1a5 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
@@ -1,6 +1,6 @@
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -O0
+CFLAGS_EXTRAS := -O0
USE_LIBSTDCPP := 1
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
index 7d43aa33e9a..c825977b1a5 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
@@ -1,6 +1,6 @@
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -O0
+CFLAGS_EXTRAS := -O0
USE_LIBSTDCPP := 1
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
index 7d43aa33e9a..c825977b1a5 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
@@ -1,6 +1,6 @@
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -O0
+CFLAGS_EXTRAS := -O0
USE_LIBSTDCPP := 1
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
index 03b57891386..8b322ff320b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
@@ -1,7 +1,8 @@
OBJC_SOURCES := main.m
-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/functionalities/data-formatter/nsdictionarysynth/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
index 03b57891386..8b322ff320b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
@@ -1,7 +1,8 @@
OBJC_SOURCES := main.m
-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/functionalities/data-formatter/nssetsynth/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
index 03b57891386..8b322ff320b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
@@ -1,7 +1,8 @@
OBJC_SOURCES := main.m
-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/functionalities/data-formatter/ostypeformatting/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile
index 377a1a0373a..876340159d9 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/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/functionalities/data-formatter/poarray/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile
index 377a1a0373a..876340159d9 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/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/functionalities/data-formatter/ptr_ref_typedef/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
index 348edcd88b4..83eb77ec8a9 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
@@ -1,5 +1,5 @@
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS += -std=c++11
+CFLAGS_EXTRAS := -std=c++11
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
index 9048c720523..3767ff17e35 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
@@ -1,10 +1,8 @@
OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
+LD_EXTRAS := -framework Foundation
include Makefile.rules
-LDFLAGS += -framework Foundation
-
clean::
rm -rf $(wildcard *.o *.d *.dSYM *.log)
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
index c39b681d187..4ce23f6b0fb 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
@@ -5,10 +5,10 @@ ifeq "$(OS)" ""
endif
ifeq "$(OS)" "Darwin"
- LDFLAGS = $(CFLAGS) -Xlinker -dead_strip
+ LD_EXTRAS := -Xlinker -dead_strip
else
- CFLAGS += -fdata-sections -ffunction-sections
- LDFLAGS = $(CFLAGS) -Wl,--gc-sections
+ CFLAGS_EXTRAS := -fdata-sections -ffunction-sections
+ LD_EXTRAS := -Wl,--gc-sections
endif
MAKE_DSYM := NO
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
index 62c0a39c94a..eb07d2fbdf3 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
@@ -1,5 +1,5 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -fomit-frame-pointer
+CFLAGS_EXTRAS := -fomit-frame-pointer
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
index d94874a7a05..362b89d7f99 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
@@ -1,7 +1,8 @@
CXX_SOURCES := calling.cpp
ifneq (,$(findstring icc,$(CC)))
- CXXFLAGS += -debug inline-debug-info
+ CXXFLAGS_EXTRAS := -debug inline-debug-info
endif
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
index 5a7351146d2..44093101a50 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
@@ -1,4 +1,4 @@
OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation -framework AppKit
+LD_EXTRAS := -lobjc -framework Foundation -framework AppKit
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
index 0c26fc72697..1adf3fc44a6 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
@@ -1,4 +1,5 @@
LEVEL = ../../../make
CXX_SOURCES := main.cpp
include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O1 -glldb -Xclang -femit-debug-entry-values
+CXXFLAGS_EXTRAS := -O1 -glldb -Xclang -femit-debug-entry-values
+include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile
index 7202932571d..37dd8f40a9d 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/set-data/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/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
index 41c46c6626b..48342e8e3af 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
@@ -1,3 +1,4 @@
CXX_SOURCES := main.cpp
+
+CXXFLAGS_EXTRAS := -g -O1 -glldb
include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
index 78f60047cd7..cd092b77256 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
@@ -1,4 +1,5 @@
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
CXX_SOURCES := ParallelTask.cpp
ENABLE_THREADS := YES
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
index 1e84d63f106..5fd720c6d06 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
@@ -1,4 +1,5 @@
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
CXX_SOURCES := main.cpp
ENABLE_THREADS := YES
+
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile
index 377a1a0373a..876340159d9 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/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/c/blocks/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
index a90dc493b8c..57083c95274 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -fblocks
+CFLAGS_EXTRAS := -fblocks
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
index 47b3ca4be66..325be90d17e 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
@@ -1,5 +1,5 @@
C_SOURCES := main.c functions.c
-CFLAGS_EXTRAS += -O3
+CFLAGS_EXTRAS := -O3
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
index ae2e4c45e11..d3998eeef99 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
@@ -1,5 +1,5 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -O1
+CFLAGS_EXTRAS := -O1
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
index 569979a0653..e4d42f6525d 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
@@ -1,5 +1,5 @@
C_SOURCES := test.c
-CFLAGS_EXTRAS += -O1 -D_FORTIFY_SOURCE=0
+CFLAGS_EXTRAS := -O1 -D_FORTIFY_SOURCE=0
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
index db8ac60dd19..a40a666476c 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -finput-charset=UTF-8 -fextended-identifiers -std=c99
+CFLAGS_EXTRAS := -finput-charset=UTF-8 -fextended-identifiers -std=c99
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
index ac4b37c7c7b..a02c72adc20 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
@@ -1,8 +1,9 @@
CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
clean: OBJECTS+=$(wildcard main.d.*)
-include Makefile.rules
+
+include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
index 4a430eccc70..a98dca64e8a 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
@@ -1,5 +1,5 @@
PCH_CXX_SOURCE = pch.h
CXX_SOURCES = main.cpp
-CFLAGS_EXTRAS += $(MODULE_DEBUG_INFO_FLAGS)
+CFLAGS_EXTRAS := $(MODULE_DEBUG_INFO_FLAGS)
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
index 8e811fdeb67..ba7e0153752 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
@@ -1,5 +1,5 @@
CXX_SOURCES = main.cpp derived.cpp base.cpp
-CFLAGS_EXTRAS += $(LIMIT_DEBUG_INFO_FLAGS)
+CFLAGS_EXTRAS := $(LIMIT_DEBUG_INFO_FLAGS)
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
index 9e7837a7695..3dff43b34c7 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
@@ -1,4 +1,4 @@
CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(BUILDDIR)/include
+CXXFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(BUILDDIR)/include
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
index 57ee6052ae9..e891bb25dd9 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
@@ -1,5 +1,5 @@
CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
-include Makefile.rules \ No newline at end of file
+include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
index f96dd95399e..b016f006747 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
@@ -1,5 +1,5 @@
CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
USE_LIBCPP := 1
include Makefile.rules
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
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
index 7423b54218a..7cfe4a3f0fd 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
@@ -1,4 +1,4 @@
OBJCXX_SOURCES := main.mm
-LDFLAGS = $(CFLAGS) -lobjc -framework CoreFoundation
+LD_EXTRAS := -lobjc -framework CoreFoundation
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
index c0b4b1a3470..3af75c304c3 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
@@ -1,4 +1,4 @@
OBJCXX_SOURCES := main.mm
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
index c0b4b1a3470..3af75c304c3 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
@@ -1,4 +1,4 @@
OBJCXX_SOURCES := main.mm
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile b/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
index fa3eadef65f..98042d61ea5 100644
--- a/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
@@ -1,5 +1,5 @@
CXX_SOURCES := main.cpp
-LD_EXTRAS += -Wl,--build-id=none
+LD_EXTRAS := -Wl,--build-id=none
all: stripped.out
diff --git a/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile b/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
index 169460598a2..4f3dd568d5f 100644
--- a/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
@@ -1,5 +1,5 @@
C_SOURCES := a.c b.c
-a.o: CFLAGS_EXTRAS += -gsplit-dwarf
+a.o: CFLAGS_EXTRAS := -gsplit-dwarf
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
index 357a6032bcd..ee67988d065 100644
--- a/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
@@ -1,5 +1,5 @@
C_SOURCES := main.c
-LDFLAGS = $(CFLAGS) -Xlinker -order_file -Xlinker $(SRCDIR)/order-file
+LD_EXTRAS = -Xlinker -order_file -Xlinker $(SRCDIR)/order-file
MAKE_DSYM := NO
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 94b11ec4055..5a056b1475a 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -335,7 +335,7 @@ ifeq "$(MAKE_GMODULES)" "YES"
CXXFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS)
endif
-CXXFLAGS += -std=c++11 $(CFLAGS) $(ARCH_CXXFLAGS)
+CXXFLAGS += -std=c++11 $(CFLAGS) $(ARCH_CXXFLAGS) $(CXXFLAGS_EXTRAS)
LD = $(CC)
LDFLAGS ?= $(CFLAGS)
LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS)
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
index b5256564c2f..33da5d0645e 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
@@ -1,6 +1,8 @@
CXX_SOURCES := main.cpp
+include Makefile.rules
+
# Clean renamed executable on 'make clean'
-clean: OBJECTS+=no_synth
+clean::
+ $(RM) -f no_synth
-include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
index b5256564c2f..16a823213db 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
@@ -1,6 +1,7 @@
CXX_SOURCES := main.cpp
-# Clean renamed executable on 'make clean'
-clean: OBJECTS+=no_synth
-
include Makefile.rules
+
+# Clean renamed executable on 'make clean'
+clean::
+ $(RM) -f no_synth
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
index 4cb3dc98c8c..e6d9d8310a0 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
@@ -1,7 +1,7 @@
C_SOURCES := inlines.c
ifneq (,$(findstring icc,$(CC)))
- CFLAGS += -debug inline-debug-info
+ CFLAGS_EXTRAS := -debug inline-debug-info
endif
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
index 200bdafd69f..4d11bbc8b6a 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
@@ -1,4 +1,4 @@
-CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS
ENABLE_THREADS := YES
CXX_SOURCES := main.cpp
MAKE_DSYM := NO
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
index 938161724be..6b33049a78b 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
@@ -1,4 +1,4 @@
-CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS
ENABLE_THREADS := YES
CXX_SOURCES := main.cpp
MAKE_DSYM :=NO
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
index 5eed4cb698c..79209db9696 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
@@ -1,4 +1,4 @@
-CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS
ENABLE_THREADS := YES
CXX_SOURCES := main.cpp b.cpp c.cpp
MAKE_DSYM :=NO
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
index 03b57891386..8b322ff320b 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
@@ -1,7 +1,8 @@
OBJC_SOURCES := main.m
-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/python_api/value_var_update/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
index 95cdf295fbc..3716c6e29e9 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
@@ -1,5 +1,5 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
# See TestHelloWorld.py, which specifies the executable name with a dictionary.
EXE := hello_world
diff --git a/lldb/packages/Python/lldbsuite/test/sample_test/Makefile b/lldb/packages/Python/lldbsuite/test/sample_test/Makefile
index aa5f222c08e..695335e068c 100644
--- a/lldb/packages/Python/lldbsuite/test/sample_test/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/sample_test/Makefile
@@ -1,4 +1,4 @@
C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
index 1e0987a3022..0c441eda98b 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
@@ -1,4 +1,4 @@
-override CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS
ENABLE_THREADS := YES
CXX_SOURCES := main.cpp
MAKE_DSYM :=NO
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile
index 7fe9a3e92a7..536d2e8db48 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile
@@ -1,4 +1,4 @@
-CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -std=c++11
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -std=c++11
# LD_EXTRAS := -lpthread
CXX_SOURCES := main.cpp
MAKE_DSYM :=NO
OpenPOWER on IntegriCloud