Skip to content

Commit 7e79d7c

Browse files
committed
[LLDB][test] Update Makefile.rules to support Windows host+Linux target
These changes are aimed to support cross compilation build on Windows host for Linux target for API tests execution. They're not final: changes will follow for refactoring and adjustments to make all tests passing. Chocolatey make is recommended to use, since it is maintained better than GnuWin32 recommended here https://lldb.llvm.org/resources/build.html#codesigning (it was updated last time in 2010) and helps to avoid problems with building tests (for example, GnuWin32 doesn't support long paths and there are some other failures with building for Linux with it). This commit contains following changes: 1. Better SHELL detection for make to use on Windows host. 2. Paths are turned into POSIX-style since some tests and Unix utilities use them for manipulating files. It helps to avoid compiler/linker errors because of broken paths. 3. Compiler and linker flags are cleaned up to enable cross-compilation.
1 parent e6ec7c8 commit 7e79d7c

File tree

18 files changed

+104
-74
lines changed

18 files changed

+104
-74
lines changed

lldb/packages/Python/lldbsuite/test/make/Makefile.rules

Lines changed: 77 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../
4747
.DEFAULT_GOAL := all
4848

4949
#----------------------------------------------------------------------
50-
# If OS is not defined, use 'uname -s' to determine the OS name.
50+
# If OS or/and HOST_OS are not defined, use 'uname -s' to determine
51+
# the OS name.
5152
#
5253
# GNUWin32 uname gives "windows32" or "server version windows32" while
5354
# some versions of MSYS uname return "MSYS_NT*", but most environments
@@ -56,15 +57,12 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../
5657
# inherited all the way down to the process spawned for make.
5758
#----------------------------------------------------------------------
5859
ifeq "$(HOST_OS)" ""
59-
HOST_OS := $(shell uname -s)
60-
endif
61-
62-
ifneq (,$(findstring windows32,$(HOST_OS)))
63-
HOST_OS := Windows_NT
64-
endif
65-
66-
ifneq (,$(findstring MSYS_NT,$(HOST_OS)))
67-
HOST_OS := Windows_NT
60+
HOST_OS := $(shell uname -s)
61+
ifneq (,$(or \
62+
$(findstring windows32,$(HOST_OS)),\
63+
$(findstring MSYS_NT,$(HOST_OS))))
64+
HOST_OS := Windows_NT
65+
endif
6866
endif
6967

7068
ifeq "$(OS)" ""
@@ -80,9 +78,21 @@ endif
8078
# Also reset BUILDDIR value because "pwd" returns cygwin or msys path
8179
# which needs to be converted to windows path.
8280
#----------------------------------------------------------------------
83-
ifeq "$(OS)" "Windows_NT"
84-
SHELL = $(WINDIR)\system32\cmd.exe
81+
path_wrapper = $(1)
82+
ifeq "$(HOST_OS)" "Windows_NT"
83+
# Windows 10 and later has the lower-case 'windir' env variable.
84+
SHELL := $(or $(windir),$(WINDIR),C:\WINDOWS)\system32\cmd.exe
8585
BUILDDIR := $(shell echo %cd%)
86+
87+
ifneq (,$(filter $(OS), Linux Android))
88+
path_wrapper = $(subst \,/,$(1))
89+
# Normalize base paths at the same time.
90+
override SRCDIR := $(call path_wrapper,$(SRCDIR))
91+
override BUILDDIR := $(call path_wrapper,$(BUILDDIR))
92+
override MAKEFILE_RULES := $(call path_wrapper,$(MAKEFILE_RULES))
93+
override THIS_FILE_DIR := $(call path_wrapper,$(THIS_FILE_DIR))
94+
override LLDB_BASE_DIR := $(call path_wrapper,$(LLDB_BASE_DIR))
95+
endif
8696
endif
8797

8898
#----------------------------------------------------------------------
@@ -135,14 +145,26 @@ $(error "C compiler is not specified. Please run tests through lldb-dotest or li
135145
endif
136146

137147
#----------------------------------------------------------------------
138-
# Handle SDKROOT on Darwin
148+
# Handle SDKROOT for the cross platform builds.
139149
#----------------------------------------------------------------------
140150

141151
ifeq "$(OS)" "Darwin"
142152
ifeq "$(SDKROOT)" ""
143153
# We haven't otherwise set the SDKROOT, so set it now to macosx
144154
SDKROOT := $(shell xcrun --sdk macosx --show-sdk-path)
145155
endif
156+
SYSROOT_FLAGS := -isysroot "$(SDKROOT)"
157+
GCC_TOOLCHAIN_FLAGS :=
158+
else
159+
ifneq "$(SDKROOT)" ""
160+
SYSROOT_FLAGS := --sysroot "$(call path_wrapper,$(SDKROOT))"
161+
GCC_TOOLCHAIN_FLAGS := --gcc-toolchain="$(call path_wrapper,$(SDKROOT)/usr)"
162+
else
163+
# Do not set up these options if SDKROOT was not specified.
164+
# This is a regular build in that case (or Android).
165+
SYSROOT_FLAGS :=
166+
GCC_TOOLCHAIN_FLAGS :=
167+
endif
146168
endif
147169

148170
#----------------------------------------------------------------------
@@ -239,20 +261,15 @@ endif
239261
DEBUG_INFO_FLAG ?= -g
240262

241263
CFLAGS ?= $(DEBUG_INFO_FLAG) -O0
242-
243-
ifeq "$(OS)" "Darwin"
244-
ifneq "$(SDKROOT)" ""
245-
CFLAGS += -isysroot "$(SDKROOT)"
246-
endif
247-
endif
264+
CFLAGS += $(SYSROOT_FLAGS)
248265

249266
ifeq "$(OS)" "Darwin"
250267
CFLAGS += $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES)
251268
else
252269
CFLAGS += $(ARCHFLAG)$(ARCH)
253270
endif
254-
CFLAGS += -I$(LLDB_BASE_DIR)include -I$(LLDB_OBJ_ROOT)/include
255271

272+
CFLAGS += -I$(LLDB_BASE_DIR)/include -I$(LLDB_OBJ_ROOT)/include
256273
CFLAGS += -I$(SRCDIR) -I$(THIS_FILE_DIR)
257274

258275
ifndef NO_TEST_COMMON_H
@@ -263,9 +280,9 @@ CFLAGS += $(NO_LIMIT_DEBUG_INFO_FLAGS) $(ARCH_CFLAGS)
263280

264281
# Use this one if you want to build one part of the result without debug information:
265282
ifeq "$(OS)" "Darwin"
266-
CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS) -isysroot "$(SDKROOT)"
283+
CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG) $(ARCH) $(FRAMEWORK_INCLUDES) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS) $(SYSROOT_FLAGS)
267284
else
268-
CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS)
285+
CFLAGS_NO_DEBUG = -O0 $(ARCHFLAG)$(ARCH) $(FRAMEWORK_INCLUDES) $(ARCH_CFLAGS) $(CFLAGS_EXTRAS) $(SYSROOT_FLAGS)
269286
endif
270287

271288
ifeq "$(MAKE_DWO)" "YES"
@@ -275,7 +292,7 @@ endif
275292
ifeq "$(USE_PRIVATE_MODULE_CACHE)" "YES"
276293
THE_CLANG_MODULE_CACHE_DIR := $(BUILDDIR)/private-module-cache
277294
else
278-
THE_CLANG_MODULE_CACHE_DIR := $(CLANG_MODULE_CACHE_DIR)
295+
THE_CLANG_MODULE_CACHE_DIR := $(call path_wrapper,$(CLANG_MODULE_CACHE_DIR))
279296
endif
280297

281298
MODULE_BASE_FLAGS := -fmodules -gmodules -fmodules-cache-path=$(THE_CLANG_MODULE_CACHE_DIR)
@@ -296,11 +313,13 @@ endif
296313
CFLAGS += $(CFLAGS_EXTRAS)
297314
CXXFLAGS += -std=c++11 $(CFLAGS) $(ARCH_CXXFLAGS)
298315
LD = $(CC)
299-
LDFLAGS ?= $(CFLAGS)
316+
# Copy common options to the linker flags (dwarf, arch. & etc).
317+
#Note: we get some 'garbage' options for linker here (such as -I, --isystem & etc).
318+
LDFLAGS += $(CFLAGS)
300319
LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS)
301320
ifeq (,$(filter $(OS), Windows_NT Android Darwin))
302321
ifneq (,$(filter YES,$(ENABLE_THREADS)))
303-
LDFLAGS += -pthread
322+
LDFLAGS += -lpthread
304323
endif
305324
endif
306325
OBJECTS =
@@ -418,11 +437,28 @@ ifeq (1, $(USE_SYSTEM_STDLIB))
418437
endif
419438
endif
420439

440+
# No C++ library has been specifieed. Use libstdc++ by default.
441+
ifeq (,$(filter 1, $(USE_LIBSTDCPP) $(USE_LIBCPP) $(USE_SYSTEM_STDLIB)))
442+
# If no explicit request was made, but we have paths to a custom libcxx, use
443+
# them.
444+
ifneq ($(and $(LIBCPP_INCLUDE_DIR), $(LIBCPP_LIBRARY_DIR)),)
445+
CXXFLAGS += -nostdlib++ -nostdinc++ -cxx-isystem $(LIBCPP_INCLUDE_DIR)
446+
ifneq "$(LIBCPP_INCLUDE_TARGET_DIR)" ""
447+
CXXFLAGS += -cxx-isystem $(LIBCPP_INCLUDE_TARGET_DIR)
448+
endif
449+
LDFLAGS += -L$(LIBCPP_LIBRARY_DIR) -Wl,-rpath,$(LIBCPP_LIBRARY_DIR) -lc++ -lc++abi
450+
# Otherwise no C++ library has been specified. Use stdc++ by default.
451+
else
452+
USE_LIBSTDCPP := 1
453+
endif
454+
endif
455+
421456
ifeq (1,$(USE_LIBSTDCPP))
422457
# Clang requires an extra flag: -stdlib=libstdc++
423458
ifneq (,$(findstring clang,$(CC)))
424-
CXXFLAGS += -stdlib=libstdc++
425-
LDFLAGS += -stdlib=libstdc++
459+
# Force clang looking for the gcc's headers at specific rootfs folder.
460+
CXXFLAGS += -stdlib=libstdc++ $(GCC_TOOLCHAIN_FLAGS)
461+
LDFLAGS += -stdlib=libstdc++ $(GCC_TOOLCHAIN_FLAGS)
426462
endif
427463
endif
428464

@@ -432,18 +468,18 @@ ifeq (1,$(USE_LIBCPP))
432468
ifneq "$(LIBCPP_INCLUDE_TARGET_DIR)" ""
433469
CXXFLAGS += -cxx-isystem $(LIBCPP_INCLUDE_TARGET_DIR)
434470
endif
435-
LDFLAGS += -L$(LIBCPP_LIBRARY_DIR) -Wl,-rpath,$(LIBCPP_LIBRARY_DIR) -lc++
471+
LDFLAGS += -L$(LIBCPP_LIBRARY_DIR) -Wl,-rpath,$(LIBCPP_LIBRARY_DIR) -lc++ -lc++abi
436472
else
437473
ifeq "$(OS)" "Android"
438474
# Nothing to do, this is already handled in
439475
# Android.rules.
440476
else
441477
CXXFLAGS += -stdlib=libc++
442-
LDFLAGS += -stdlib=libc++
478+
LDFLAGS += -stdlib=libc++ -lc++abi
443479
endif
444480
ifneq (,$(filter $(OS), FreeBSD Linux NetBSD))
445481
ifneq (,$(LLVM_LIBS_DIR))
446-
LDFLAGS += -Wl,-rpath,$(LLVM_LIBS_DIR)
482+
LDFLAGS += -Wl,-rpath,$(LLVM_LIBS_DIR)
447483
endif
448484
endif
449485
endif
@@ -456,21 +492,15 @@ ifeq (1, $(USE_SYSTEM_STDLIB))
456492
endif
457493
CXXFLAGS += -nostdlib++ -nostdinc++ -cxx-isystem $(SDKROOT)/usr/include/c++/v1
458494
LDFLAGS += -L$(SDKROOT)/usr/lib -Wl,-rpath,$(SDKROOT)/usr/lib -lc++
495+
else
496+
ifneq (,$(findstring clang,$(CC)))
497+
# Force clang looking for the gcc's headers at specific rootfs folder.
498+
CXXFLAGS += -stdlib=libstdc++ $(GCC_TOOLCHAIN_FLAGS)
499+
LDFLAGS += -stdlib=libstdc++ $(GCC_TOOLCHAIN_FLAGS)
500+
endif
459501
endif
460502
endif
461503

462-
# If no explicit request was made, but we have paths to a custom libcxx, use
463-
# them.
464-
ifeq ($(or $(USE_LIBSTDCPP), $(USE_LIBCPP), $(USE_SYSTEM_STDLIB)),)
465-
ifneq ($(and $(LIBCPP_INCLUDE_DIR), $(LIBCPP_LIBRARY_DIR)),)
466-
CXXFLAGS += -nostdlib++ -nostdinc++ -cxx-isystem $(LIBCPP_INCLUDE_DIR)
467-
ifneq "$(LIBCPP_INCLUDE_TARGET_DIR)" ""
468-
CXXFLAGS += -cxx-isystem $(LIBCPP_INCLUDE_TARGET_DIR)
469-
endif
470-
LDFLAGS += -L$(LIBCPP_LIBRARY_DIR) -Wl,-rpath,$(LIBCPP_LIBRARY_DIR) -lc++
471-
endif
472-
endif
473-
474504
#----------------------------------------------------------------------
475505
# Additional system libraries
476506
#----------------------------------------------------------------------
@@ -659,20 +689,20 @@ endif
659689

660690
ifneq "$(PCH_OUTPUT)" ""
661691
$(PCH_OUTPUT) : $(PCH_CXX_SOURCE)
662-
$(CXX) $(CXXFLAGS) -x c++-header -o $@ $<
692+
$(CXX) $(CXXFLAGS) -x c++-header -o $@ $(call path_wrapper,$<)
663693
endif
664694

665695
%.o: %.c %.d
666-
$(CC) $(CFLAGS) -MT $@ -MD -MP -MF $*.d -c -o $@ $<
696+
$(CC) $(CFLAGS) -MT $@ -MD -MP -MF $*.d -c -o $@ $(call path_wrapper,$<)
667697

668698
%.o: %.cpp %.d $(PCH_OUTPUT)
669-
$(CXX) $(PCHFLAGS) $(CXXFLAGS) -MT $@ -MD -MP -MF $*.d -c -o $@ $<
699+
$(CXX) $(PCHFLAGS) $(CXXFLAGS) -MT $@ -MD -MP -MF $*.d -c -o $@ $(call path_wrapper,$<)
670700

671701
%.o: %.m %.d
672-
$(CC) $(CFLAGS) -MT $@ -MD -MP -MF $*.d -c -o $@ $<
702+
$(CC) $(CFLAGS) -MT $@ -MD -MP -MF $*.d -c -o $@ $(call path_wrapper,$<)
673703

674704
%.o: %.mm %.d
675-
$(CXX) $(CXXFLAGS) -MT $@ -MD -MP -MF $*.d -c -o $@ $<
705+
$(CXX) $(CXXFLAGS) -MT $@ -MD -MP -MF $*.d -c -o $@ $(call path_wrapper,$<)
676706

677707
#----------------------------------------------------------------------
678708
# Automatic variables based on items already entered. Below we create

lldb/test/API/commands/settings/use_source_cache/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ include Makefile.rules
55

66
# Copy file into the build folder to enable the test to modify it.
77
main-copy.cpp: main.cpp
8-
cp -f $< $@
8+
cp -f $(call path_wrapper,$<) $@

lldb/test/API/functionalities/breakpoint/comp_dir_symlink/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ include Makefile.rules
66

77
# Force relative filenames by copying it into the build directory.
88
relative.cpp: main.cpp
9-
cp -f $< $@
9+
cp -f $(call path_wrapper,$<) $@

lldb/test/API/functionalities/inline-sourcefile/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ OBJECTS += inline.o
88
$(EXE): main.c inline.o
99

1010
%.o: %.ll
11-
$(CC) $< -c -o $@
11+
$(CC) $(call path_wrapper,$<) -c -o $@

lldb/test/API/functionalities/multiple-slides/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ include Makefile.rules
88
# sliding the binary, the address of `first` and
99
# `second` are not slid for some reason on Darwin.
1010
main.o: main.c
11-
$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
11+
$(CC) $(CFLAGS_NO_DEBUG) -c $(call path_wrapper,$<) -o $@
1212

lldb/test/API/functionalities/postmortem/netbsd-core/GNUmakefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ clean:
88
rm -f $(CORES) $(EXECS)
99

1010
%.core: %
11-
sysctl -w proc.$$$$.corename=$@; ulimit -s 16; ! ./$<
11+
sysctl -w proc.$$$$.corename=$@; ulimit -s 16; ! ./$(call path_wrapper,$<)
1212
%.$(ARCH): %.c
13-
$(CC) -o $@ -g $<
13+
$(CC) -o $@ -g $(call path_wrapper,$<)
1414

1515
.PHONY: all clean

lldb/test/API/functionalities/step-avoids-no-debug/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ C_SOURCES := with-debug.c without-debug.c
33
include Makefile.rules
44

55
without-debug.o: without-debug.c
6-
$(CC) $(CFLAGS_NO_DEBUG) -c $<
6+
$(CC) $(CFLAGS_NO_DEBUG) -c $(call path_wrapper,$<)

lldb/test/API/functionalities/valobj_errors/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ LD_EXTRAS = hidden.o
44
a.out: hidden.o
55

66
hidden.o: hidden.c
7-
$(CC) -g0 -c -o $@ $<
7+
$(CC) -g0 -c -o $@ $(call path_wrapper,$<)
88

99
include Makefile.rules

lldb/test/API/lang/cpp/operator-overload/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ CXX_SOURCES = a.cpp b.cpp
33
include Makefile.rules
44

55
a.o: a.cpp
6-
$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
6+
$(CC) $(CFLAGS_NO_DEBUG) -c $(call path_wrapper,$<) -o $@

lldb/test/API/lang/objcxx/class-name-clash/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ include Makefile.rules
33

44
# myobject.o needs to be built without debug info
55
myobject.o: myobject.mm
6-
$(CXX) $(CFLAGS_NO_DEBUG) -c -o $@ $<
6+
$(CXX) $(CFLAGS_NO_DEBUG) -c -o $@ $(call path_wrapper,$<)

lldb/test/API/linux/add-symbols/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ LD_EXTRAS := -Wl,--build-id=none
44
all: stripped.out
55

66
stripped.out : a.out
7-
$(OBJCOPY) --remove-section=.note.gnu.build-id --remove-section=.gnu_debuglink --strip-debug $< $@
7+
$(OBJCOPY) --remove-section=.note.gnu.build-id --remove-section=.gnu_debuglink --strip-debug $(call path_wrapper,$<) $@
88

99
include Makefile.rules

lldb/test/API/linux/sepdebugsymlink/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ all: dirsymlink
55
dirreal: a.out
66
$(RM) -r $@
77
mkdir $@
8-
$(OBJCOPY) --only-keep-debug $< $@/stripped.debug
8+
$(OBJCOPY) --only-keep-debug $(call path_wrapper,$<) $@/stripped.debug
99
$(OBJCOPY) --strip-all --add-gnu-debuglink=$@/stripped.debug $< $@/stripped.out
1010

1111
dirsymlink: dirreal

lldb/test/API/macosx/function-starts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ MAKE_DSYM := NO
55
include Makefile.rules
66

77
main.o: main.cpp
8-
$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
8+
$(CC) $(CFLAGS_NO_DEBUG) -c $(call path_wrapper,$<) -o $@

lldb/test/API/macosx/posix_spawn/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ include Makefile.rules
66
all: fat.out
77

88
x86_64.out: x86_64.c
9-
$(CC) -isysroot $(SDKROOT) -target x86_64-apple-macosx10.9 -o x86_64.out $<
9+
$(CC) -isysroot $(SDKROOT) -target x86_64-apple-macosx10.9 -o x86_64.out $(call path_wrapper,$<)
1010

1111
x86_64h.out: x86_64h.c
12-
$(CC) -isysroot $(SDKROOT) -target x86_64h-apple-macosx10.9 -o x86_64h.out $<
12+
$(CC) -isysroot $(SDKROOT) -target x86_64h-apple-macosx10.9 -o x86_64h.out $(call path_wrapper,$<)
1313

1414
arm64.out: arm64.c
15-
$(CC) -isysroot $(SDKROOT) -target arm64-apple-macosx10.9 -o arm64.out $<
15+
$(CC) -isysroot $(SDKROOT) -target arm64-apple-macosx10.9 -o arm64.out $(call path_wrapper,$<)
1616

1717
fat.out: x86_64.out x86_64h.out arm64.out
1818
$(LIPO) -o fat.out -create $^

lldb/test/API/macosx/universal/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ testit: testit.x86_64h testit.x86_64
88
lipo -create -o testit $^
99

1010
testit.x86_64h: testit.x86_64h.o
11-
$(CC) -isysroot $(SDKROOT) -target x86_64h-apple-macosx10.9 -o testit.x86_64h $<
11+
$(CC) -isysroot $(SDKROOT) -target x86_64h-apple-macosx10.9 -o testit.x86_64h $(call path_wrapper,$<)
1212

1313
testit.x86_64: testit.x86_64.o
14-
$(CC) -isysroot $(SDKROOT) -target x86_64-apple-macosx10.9 -o testit.x86_64 $<
14+
$(CC) -isysroot $(SDKROOT) -target x86_64-apple-macosx10.9 -o testit.x86_64 $(call path_wrapper,$<)
1515

1616
testit.x86_64h.o: main.c
17-
$(CC) -isysroot $(SDKROOT) -g -O0 -target x86_64h-apple-macosx10.9 -c -o testit.x86_64h.o $<
17+
$(CC) -isysroot $(SDKROOT) -g -O0 -target x86_64h-apple-macosx10.9 -c -o testit.x86_64h.o $(call path_wrapper,$<)
1818

1919
testit.x86_64.o: main.c
20-
$(CC) -isysroot $(SDKROOT) -g -O0 -target x86_64-apple-macosx10.9 -c -o testit.x86_64.o $<
20+
$(CC) -isysroot $(SDKROOT) -g -O0 -target x86_64-apple-macosx10.9 -c -o testit.x86_64.o $(call path_wrapper,$<)

lldb/test/API/macosx/universal64/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ fat.out: fat.x86_64h.out fat.x86_64.out
1212
lipo -fat64 -create -o $@ $^
1313

1414
fat.x86_64.out: fat.x86_64.o
15-
$(CC) -isysroot $(SDKROOT) -target x86_64-apple-macosx10.9 -o $@ $<
15+
$(CC) -isysroot $(SDKROOT) -target x86_64-apple-macosx10.9 -o $@ $(call path_wrapper,$<)
1616

1717
fat.x86_64h.out: fat.x86_64h.o
18-
$(CC) -isysroot $(SDKROOT) -target x86_64h-apple-macosx10.9 -o $@ $<
18+
$(CC) -isysroot $(SDKROOT) -target x86_64h-apple-macosx10.9 -o $@ $(call path_wrapper,$<)
1919

2020
fat.x86_64.o: main.c
21-
$(CC) -isysroot $(SDKROOT) -g -O0 -target x86_64-apple-macosx10.9 -c -o $@ $<
21+
$(CC) -isysroot $(SDKROOT) -g -O0 -target x86_64-apple-macosx10.9 -c -o $@ $(call path_wrapper,$<)
2222

2323
fat.x86_64h.o: main.c
24-
$(CC) -isysroot $(SDKROOT) -g -O0 -target x86_64h-apple-macosx10.9 -c -o $@ $<
24+
$(CC) -isysroot $(SDKROOT) -g -O0 -target x86_64h-apple-macosx10.9 -c -o $@ $(call path_wrapper,$<)

lldb/test/API/source-manager/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ include Makefile.rules
44

55
# Copy file into the build folder to enable the test to modify it.
66
main-copy.c: main.c
7-
cp -f $< $@
7+
cp -f $(call path_wrapper,$<) $@

0 commit comments

Comments
 (0)