Skip to content

Commit 2fbaa92

Browse files
authored
Use -iquote. to include the current directory (#27173)
Uses `-iquote.` instead of `-I.` to prevent issues with C++ headers with GPU compilation Resolves #27128 - [x] paratest - [x] paratest with GASNet [Reviewed by @mppf]
2 parents 525a3a2 + 06979af commit 2fbaa92

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

compiler/llvm/clangUtil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2897,7 +2897,7 @@ static void helpComputeClangArgs(std::string& clangCC,
28972897
}
28982898

28992899
// add a -I. so we can find headers named on command line in same dir
2900-
clangCCArgs.push_back("-I.");
2900+
clangCCArgs.push_back("-iquote.");
29012901

29022902
// add a -I for the generated code directory
29032903
clangCCArgs.push_back(std::string("-I") + getIntermediateDirName());

runtime/etc/Makefile.exe

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ endef
3636
CHPLUSEROBJFILES = $(CHPLUSEROBJ:%=%.o)
3737

3838
$(TMPDIRNAME)/%.o: $(TMPDIRNAME)/%.c
39-
$(CC) $(GEN_CFLAGS) $(CHPL_MAKE_TARGET_BUNDLED_COMPILE_ARGS) $(COMP_GEN_CFLAGS) -I. $(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS) -c -o $@ $(CHPL_RT_INC_DIR) $<
39+
$(CC) $(GEN_CFLAGS) $(CHPL_MAKE_TARGET_BUNDLED_COMPILE_ARGS) $(COMP_GEN_CFLAGS) -iquote. $(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS) -c -o $@ $(CHPL_RT_INC_DIR) $<
4040

4141
$(TMPBINNAME): $(CHPL_CL_OBJS) checkRtLibDir $(CHPLUSEROBJFILES) FORCE
4242
$(TAGS_COMMAND)

runtime/etc/Makefile.include

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ x:
8989

9090
printincludesanddefines:
9191
@echo $(CHPL_MAKE_TARGET_BUNDLED_COMPILE_ARGS) \
92-
-I. \
92+
-iquote. \
9393
$(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS)
9494

9595
printcompileline:
9696
@echo $(CC) \
9797
$(SANITIZER_CFLAGS) $(CHPL_MAKE_BASE_CFLAGS) $(COMP_GEN_CFLAGS) \
9898
$(CHPL_MAKE_TARGET_BUNDLED_COMPILE_ARGS) \
99-
-I. \
99+
-iquote. \
100100
$(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS)
101101

102102
printcxxcompileline:

runtime/etc/Makefile.launcher

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ endif
5555
ifneq ($(CHPL_MAKE_IS_MLI),1)
5656
$(CC) $(GEN_CFLAGS) $(COMP_GEN_CFLAGS) \
5757
-c -o $(TMPBINNAME)_launcher.o \
58-
-DLAUNCHER $(CHPL_LN_INCS) -I. $(LAUNCHER_SRC_NAME)
58+
-DLAUNCHER $(CHPL_LN_INCS) -iquote. $(LAUNCHER_SRC_NAME)
5959
else
6060
#
6161
# If we are building launcher object files for a multi-locale library, then
@@ -64,7 +64,7 @@ else
6464
#
6565
$(CC) $(GEN_CFLAGS) $(COMP_GEN_CFLAGS) $(SHARED_LIB_CFLAGS) \
6666
-c -o $(TMPBINNAME)_launcher.o \
67-
-DLAUNCHER $(CHPL_LN_INCS) -I. $(LAUNCHER_SRC_NAME)
67+
-DLAUNCHER $(CHPL_LN_INCS) -iquote. $(LAUNCHER_SRC_NAME)
6868
endif
6969
ifneq ($(CHPL_MAKE_IS_MLI),1)
7070
$(LD) $(GEN_LFLAGS) $(COMP_GEN_LFLAGS) -o $(TMPBINNAME)_launcher -L$(CHPL_LN_LIB_DIR) $(TMPBINNAME)_launcher.o $(CHPL_LN_LIB_DIR)/main_launcher.o -lchpllaunch -lm $(LAUNCH_LIBS)

runtime/etc/Makefile.mli-common

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ endif
9090
$(TMPSERVERNAME): $(CHPL_CL_OBJS)
9191
ifneq ($(SKIP_COMPILE_LINK),skip)
9292
# Compile the server bundle.
93-
$(CC) $(GEN_CFLAGS) $(CHPL_MAKE_TARGET_BUNDLED_COMPILE_ARGS) $(COMP_GEN_CFLAGS) -I. $(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS) \
93+
$(CC) $(GEN_CFLAGS) $(CHPL_MAKE_TARGET_BUNDLED_COMPILE_ARGS) $(COMP_GEN_CFLAGS) -iquote. $(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS) \
9494
-c -o $(TMPSERVERNAME).o \
9595
$(CHPLSERVERSRC) \
9696
$(CHPL_MLI_INC_DIRS) \

runtime/etc/Makefile.mli-shared

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ $(TMPBINNAME): $(CHPL_CL_OBJS) FORCE
5959
# Compile the client bundle. Note the use of $(SHARED_LIB_CFLAGS) here.
6060
$(CC) $(SHARED_LIB_CFLAGS) $(GEN_CFLAGS) \
6161
$(CHPL_MAKE_TARGET_BUNDLED_COMPILE_ARGS) $(COMP_GEN_CFLAGS) \
62-
-I. $(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS) \
62+
-iquote. $(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS) \
6363
-c -o $(TMPBINNAME).o \
6464
$(CHPLSRC) \
6565
$(COMP_GEN_MLI_EXTRA_INCLUDES) \

runtime/etc/Makefile.mli-static

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ $(TMPBINNAME): $(CHPL_CL_OBJS) FORCE
5151
# Compile the client bundle.
5252
$(CC) $(GEN_CFLAGS) \
5353
$(CHPL_MAKE_TARGET_BUNDLED_COMPILE_ARGS) $(COMP_GEN_CFLAGS) \
54-
-I. $(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS) \
54+
-iquote. $(CHPL_MAKE_TARGET_SYSTEM_COMPILE_ARGS) \
5555
-c -o $(TMPBINNAME).o \
5656
$(CHPLSRC) \
5757
$(COMP_GEN_MLI_EXTRA_INCLUDES) \

0 commit comments

Comments
 (0)