aprantl created this revision.
aprantl added reviewers: jasonmolenda, JDevlieghere, labath.
Herald added subscribers: arphaman, christof.

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.


https://reviews.llvm.org/D67984

Files:
  lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
  lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
  lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile
  
lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile
  
lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile
  
lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
  
lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile
  
lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile
  
lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile
  lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile
  lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
  lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile
  lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
  lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile
  lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile
  
lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile
  
lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile
  lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
  
lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
  lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile
  lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
  lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
  lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
  lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
  lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
  
lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile
  lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
  lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
  lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
  lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
  lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
  
lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
  
lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
  
lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
  lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
  lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
  lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
  lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
  lldb/packages/Python/lldbsuite/test/make/Makefile.rules
  lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
  lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
  lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
  lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
  lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
  lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
  lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
  lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
  lldb/packages/Python/lldbsuite/test/sample_test/Makefile
  lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
  lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile

Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/sample_test/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/sample_test/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
+++ 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
 
Index: lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/make/Makefile.rules
===================================================================
--- lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -335,7 +335,7 @@
 	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)
Index: lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
+++ 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
 
Index: lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
+++ 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
 
Index: lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
+++ 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
 
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile
+++ 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
 
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
+++ lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
@@ -2,6 +2,6 @@
 
 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile
+++ 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
 
Index: lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
+++ lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
@@ -2,6 +2,7 @@
 DYLIB_OBJC_SOURCES := Container.m
 OBJC_SOURCES := main.m
 
-include Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
+++ lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
@@ -1,6 +1,6 @@
 CXX_SOURCES := main.cpp
 
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 
 clean: OBJECTS+=$(wildcard main.d.*)
 
Index: lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile
+++ lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile
@@ -1,4 +1,4 @@
 CXX_SOURCES = main.cpp a.cpp
-CFLAGS_EXTRAS = $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
+CFLAGS_EXTRAS := $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
 
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
@@ -1,4 +1,4 @@
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
@@ -1,4 +1,4 @@
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 CXX_SOURCES := ParallelTask.cpp
 ENABLE_THREADS := YES
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
 include Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+CXXFLAGS_EXTRAS := -g -O1 -glldb
Index: lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
@@ -1,4 +1,4 @@
 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
@@ -1,7 +1,7 @@
 CXX_SOURCES := calling.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
@@ -5,10 +5,10 @@
 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
+++ 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)
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
@@ -1,5 +1,5 @@
 CXX_SOURCES := main.cpp
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
 
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -std=c++17
+CXXFLAGS_EXTRAS := -std=c++17
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
@@ -3,8 +3,7 @@
 # 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -std=c++11 -O0
+CXXFLAGS_EXTRAS := -std=c++11 -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -std=c++17 -fno-exceptions
+CXXFLAGS_EXTRAS := -std=c++17 -fno-exceptions
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
@@ -2,4 +2,4 @@
 
 USE_LIBCPP := 1
 include Makefile.rules
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
@@ -1,3 +1,3 @@
 CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
@@ -1,4 +1,4 @@
 CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 USE_LIBCPP := 1
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
@@ -1,4 +1,4 @@
 CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 USE_LIBCPP := 1
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
@@ -3,4 +3,4 @@
 
 include Makefile.rules
 
-CXXFLAGS += -O0
+CXXFLAGS_EXTRAS := -O0
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
@@ -1,7 +1,7 @@
 CXX_SOURCES := main.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
@@ -1,7 +1,7 @@
 CXX_SOURCES := main.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
@@ -1,7 +1,7 @@
 CXX_SOURCES := main.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
+++ lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
@@ -1,7 +1,7 @@
 CXX_SOURCES := main.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
+++ 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
 
Index: lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
+++ lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
@@ -1,4 +1,4 @@
 CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 
 include Makefile.rules
Index: lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
+++ lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
@@ -3,6 +3,6 @@
 # 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
Index: lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
+++ 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
Index: lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
===================================================================
--- lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
+++ 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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to