[clang] [flang] [flang][nfc] Refactor linker invocation logic (PR #75534)
https://github.com/psteinfeld commented: After this change, I can no longer use flang-new to create an executable program. When I try, I get the following output: ``` [psteinfeld@ice4 build]$ flang-new hello.f90 /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../bin/ld: /local/home/psteinfeld/up/build/lib/libFortran_main.a(Fortran_main.c.o): in function `main': Fortran_main.c:(.text.startup.main+0xf): undefined reference to `_FortranAProgramStart' /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../bin/ld: Fortran_main.c:(.text.startup.main+0x19): undefined reference to `_FortranAProgramEndStatement' flang-new: error: linker command failed with exit code 1 (use -v to see invocation) ``` https://github.com/llvm/llvm-project/pull/75534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang][nfc] Refactor linker invocation logic (PR #75648)
https://github.com/psteinfeld approved this pull request. All looks good. Thanks for the quick fix! https://github.com/llvm/llvm-project/pull/75648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)
psteinfeld wrote: @mjklemm, after this change was integrated, the test Driver/ctofortran no longer succeeds. This test gets run when you call `make check-flang`. I'm not sure why the pre- and post-build checks did not run check-flang. https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)
psteinfeld wrote: > @mjklemm, after this change was integrated, the test Driver/ctofortran no > longer succeeds. This test gets run when you call `make check-flang`. I'm not > sure why the pre- and post-build checks did not run check-flang. I've submitted #73738 to fix this. https://github.com/llvm/llvm-project/pull/73124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [flang] [flang] Fixes for LIT testing of FLANG_RUNTIME_F128_MATH_LIB build. (PR #82832)
https://github.com/psteinfeld approved this pull request. All builds and tests correctly and looks good. https://github.com/llvm/llvm-project/pull/82832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [llvm] [flang] [clang] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)
psteinfeld wrote: See issue #77975. https://github.com/llvm/llvm-project/pull/74077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[llvm] [clang] [flang] [clang-tools-extra] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)
psteinfeld wrote: See issue #77984 https://github.com/llvm/llvm-project/pull/74077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang-tools-extra] [flang] [llvm] [flang] Add EXECUTE_COMMAND_LINE runtime and lowering intrinsics implementation (PR #74077)
psteinfeld wrote: See issue #77979. https://github.com/llvm/llvm-project/pull/74077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [clang] [flang] [libc] [compiler-rt] [llvm] [flang] use setsid to assign the child to prevent zombie as it will be clean up by init process (PR #77944)
https://github.com/psteinfeld approved this pull request. All builds and tests correctly and looks good. https://github.com/llvm/llvm-project/pull/77944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [openmp] Revert "[Libomp] Place generated OpenMP headers into build resource d… (PR #88083)
https://github.com/psteinfeld created https://github.com/llvm/llvm-project/pull/88083 …irectory (#88007)" This reverts commit 8671429151d5e67d3f21a737809953ae8bdfbfde. This commit broke the flang build, so I'm reverting it. See the comments in merge request #88007 for more information. >From e3e26a846a411a91c4537cffc08f293027488679 Mon Sep 17 00:00:00 2001 From: Peter Steinfeld Date: Mon, 8 Apr 2024 20:08:26 -0700 Subject: [PATCH] Revert "[Libomp] Place generated OpenMP headers into build resource directory (#88007)" This reverts commit 8671429151d5e67d3f21a737809953ae8bdfbfde. This commit broke the flang build, so I'm reverting it. See the comments in merge request #88007 for more information. --- clang/test/Headers/Inputs/include/stdint.h | 8 --- openmp/runtime/src/CMakeLists.txt | 25 -- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/clang/test/Headers/Inputs/include/stdint.h b/clang/test/Headers/Inputs/include/stdint.h index 67b27b8dfc7b92..5bf26a7b67b066 100644 --- a/clang/test/Headers/Inputs/include/stdint.h +++ b/clang/test/Headers/Inputs/include/stdint.h @@ -16,12 +16,4 @@ typedef unsigned __INTPTR_TYPE__ uintptr_t; #error Every target should have __INTPTR_TYPE__ #endif -#ifdef __INTPTR_MAX__ -#define INTPTR_MAX__INTPTR_MAX__ -#endif - -#ifdef __UINTPTR_MAX__ -#define UINTPTR_MAX __UINTPTR_MAX__ -#endif - #endif /* STDINT_H */ diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt index 000d02c33dc093..f05bcabb441742 100644 --- a/openmp/runtime/src/CMakeLists.txt +++ b/openmp/runtime/src/CMakeLists.txt @@ -10,19 +10,12 @@ include(ExtendPath) -# The generated headers will be placed in clang's resource directory if present. -if(${OPENMP_STANDALONE_BUILD}) - set(LIBOMP_HEADERS_INTDIR ${CMAKE_CURRENT_BINARY_DIR}) -else() - set(LIBOMP_HEADERS_INTDIR ${LLVM_BINARY_DIR}/${LIBOMP_HEADERS_INSTALL_PATH}) -endif() - # Configure omp.h, kmp_config.h and omp-tools.h if necessary -configure_file(${LIBOMP_INC_DIR}/omp.h.var ${LIBOMP_HEADERS_INTDIR}/omp.h @ONLY) -configure_file(${LIBOMP_INC_DIR}/ompx.h.var ${LIBOMP_HEADERS_INTDIR}/ompx.h @ONLY) -configure_file(kmp_config.h.cmake ${LIBOMP_HEADERS_INTDIR}/kmp_config.h @ONLY) +configure_file(${LIBOMP_INC_DIR}/omp.h.var omp.h @ONLY) +configure_file(${LIBOMP_INC_DIR}/ompx.h.var ompx.h @ONLY) +configure_file(kmp_config.h.cmake kmp_config.h @ONLY) if(${LIBOMP_OMPT_SUPPORT}) - configure_file(${LIBOMP_INC_DIR}/omp-tools.h.var ${LIBOMP_HEADERS_INTDIR}/omp-tools.h @ONLY) + configure_file(${LIBOMP_INC_DIR}/omp-tools.h.var omp-tools.h @ONLY) endif() # Generate message catalog files: kmp_i18n_id.inc and kmp_i18n_default.inc @@ -426,15 +419,15 @@ else() endif() install( FILES - ${LIBOMP_HEADERS_INTDIR}/omp.h - ${LIBOMP_HEADERS_INTDIR}/ompx.h + ${CMAKE_CURRENT_BINARY_DIR}/omp.h + ${CMAKE_CURRENT_BINARY_DIR}/ompx.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} ) if(${LIBOMP_OMPT_SUPPORT}) - install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH}) # install under legacy name ompt.h - install(FILES ${LIBOMP_HEADERS_INTDIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} RENAME ompt.h) - set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${LIBOMP_HEADERS_INTDIR} PARENT_SCOPE) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/omp-tools.h DESTINATION ${LIBOMP_HEADERS_INSTALL_PATH} RENAME ompt.h) + set(LIBOMP_OMP_TOOLS_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) endif() if(${BUILD_FORTRAN_MODULES}) set (destination ${LIBOMP_HEADERS_INSTALL_PATH}) ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [openmp] [Libomp] Place generated OpenMP headers into build resource directory (PR #88007)
psteinfeld wrote: Hey, @jhuber. This change broke the flang build. When I revert the change, everything builds cleanly. So I reverted it in merge request After this change was added, I started getting messages like: ``` [4/205] Building CXX object projects/openmp/libomptarget/plugins-nextgen/host/CMakeFiles/omptarget.rtl.x86_64.dir/dynamic_ffi/ffi.cpp.o FAILED: projects/openmp/libomptarget/plugins-nextgen/host/CMakeFiles/omptarget.rtl.x86_64.dir/dynamic_ffi/ffi.cpp.o /usr/bin/c++ -DDEBUG_PREFIX="\"TARGET x86_64 RTL\"" -DGTEST_HAS_RTTI=0 -DLIBOMPTARGET_NEXTGEN_GENERIC_PLUGIN_TRIPLE=\"x86_64-pc-linux-gnu\" -DOMPT_SUPPORT=1 -DTARGET_ELF_ID=EM_X86_64 -DTARGET_NAME=x86_64 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/local/home/psteinfeld/up/build/projects/openmp/libomptarget/plugins-nextgen/host -I/local/home/psteinfeld/up/llvm-project/openmp/libomptarget/plugins-nextgen/host -I/local/home/psteinfeld/up/build/include -I/local/home/psteinfeld/up/llvm-project/llvm/include -I/local/home/psteinfeld/up/build/lib/clang/19/include -I/local/home/psteinfeld/up/llvm-project/openmp/libomptarget/plugins-nextgen/host/dynamic_ffi -I/local/home/psteinfeld/up/llvm-project/openmp/libomptarget/include -I/local/home/psteinfeld/up/llvm-project/openmp/libomptarget/plugins-nextgen/common/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wcast-qual -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -Wno-maybe-uninitialized -fno-semantic-interposition -fdata-sections -O3 -DNDEBUG -std=c++17 -fPIC -fvisibility=protected -fno-exceptions -funwind-tables -fno-rtti -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -fno-exceptions -fno-rtti -MD -MT projects/openmp/libomptarget/plugins-nextgen/host/CMakeFiles/omptarget.rtl.x86_64.dir/dynamic_ffi/ffi.cpp.o -MF projects/openmp/libomptarget/plugins-nextgen/host/CMakeFiles/omptarget.rtl.x86_64.dir/dynamic_ffi/ffi.cpp.o.d -o projects/openmp/libomptarget/plugins-nextgen/host/CMakeFiles/omptarget.rtl.x86_64.dir/dynamic_ffi/ffi.cpp.o -c /local/home/psteinfeld/up/llvm-project/openmp/libomptarget/plugins-nextgen/host/dynamic_ffi/ffi.cpp In file included from /usr/include/wchar.h:35, from /usr/include/c++/8/cwchar:44, from /usr/include/c++/8/bits/postypes.h:40, from /usr/include/c++/8/bits/char_traits.h:40, from /usr/include/c++/8/string:40, from /local/home/psteinfeld/up/llvm-project/llvm/include/llvm/Support/DynamicLibrary.h:16, from /local/home/psteinfeld/up/llvm-project/openmp/libomptarget/plugins-nextgen/host/dynamic_ffi/ffi.cpp:13: /local/home/psteinfeld/up/build/lib/clang/19/include/stddef.h:31:42: error: missing binary operator before token "(" #if !defined(__STDDEF_H) || __has_feature(modules) || \ ^ In file included from /usr/include/wchar.h:38, from /usr/include/c++/8/cwchar:44, from /usr/include/c++/8/bits/postypes.h:40, from /usr/include/c++/8/bits/char_traits.h:40, from /usr/include/c++/8/string:40, from /local/home/psteinfeld/up/llvm-project/llvm/include/llvm/Support/DynamicLibrary.h:16, from /local/home/psteinfeld/up/llvm-project/openmp/libomptarget/plugins-nextgen/host/dynamic_ffi/ffi.cpp:13: /local/home/psteinfeld/up/build/lib/clang/19/include/stdarg.h:31:42: error: missing binary operator before token "(" ``` https://github.com/llvm/llvm-project/pull/88007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [openmp] Revert "[Libomp] Place generated OpenMP headers into build resource d… (PR #88083)
https://github.com/psteinfeld closed https://github.com/llvm/llvm-project/pull/88083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [openmp] [Libomp] Place generated OpenMP headers into build resource directory (PR #88007)
psteinfeld wrote: I should have mentioned, I'm building with GCC 9.3.0. Most of my team uses this compiler. https://github.com/llvm/llvm-project/pull/88007 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits