[clang] [flang] [flang][driver] Avoid mentions of Clang in Flang's command line reference. (PR #88932)

2024-04-19 Thread Leandro Lupori via cfe-commits
https://github.com/luporl approved this pull request. https://github.com/llvm/llvm-project/pull/88932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-03-14 Thread Leandro Lupori via cfe-commits
@@ -3382,10 +3382,18 @@ def fopenmp : Flag<["-"], "fopenmp">, Group, HelpText<"Parse OpenMP pragmas and generate parallel code.">; def fno_openmp : Flag<["-"], "fno-openmp">, Group, Flags<[NoArgumentUnused]>; +class OpenMPVersionHelp { + string str = !strconcat( +"Set

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-03-14 Thread Leandro Lupori via cfe-commits
@@ -191,6 +191,60 @@ static MarshallingInfo createMarshallingInfo(const Record ) { return Ret; } +static void EmitHelpTextsForVariants( +raw_ostream , std::vector, StringRef>> + HelpTextsForVariants) { + // OptTable must be constexpr so it

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-03-14 Thread Leandro Lupori via cfe-commits
@@ -191,6 +191,60 @@ static MarshallingInfo createMarshallingInfo(const Record ) { return Ret; } +static void EmitHelpTextsForVariants( +raw_ostream , std::vector, StringRef>> + HelpTextsForVariants) { + // OptTable must be constexpr so it

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-03-14 Thread Leandro Lupori via cfe-commits
@@ -191,6 +191,60 @@ static MarshallingInfo createMarshallingInfo(const Record ) { return Ret; } +static void EmitHelpTextsForVariants( +raw_ostream , std::vector, StringRef>> + HelpTextsForVariants) { + // OptTable must be constexpr so it

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-03-14 Thread Leandro Lupori via cfe-commits
@@ -191,6 +191,60 @@ static MarshallingInfo createMarshallingInfo(const Record ) { return Ret; } +static void EmitHelpTextsForVariants( +raw_ostream , std::vector, StringRef>> + HelpTextsForVariants) { + // OptTable must be constexpr so it

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-03-11 Thread Leandro Lupori via cfe-commits
luporl wrote: > I'm a bit short on spare cycles for reviewing stuff :( @luporl , do you have > time to go over this? I'll bump this on my list regardless. @banach-space, yes, I can go over this in more details. https://github.com/llvm/llvm-project/pull/81869

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-02-16 Thread Leandro Lupori via cfe-commits
https://github.com/luporl commented: I think this can be useful, to make it possible to customize flang help messages, even though only one flang option requires it at the moment. https://github.com/llvm/llvm-project/pull/81869 ___ cfe-commits

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-02-16 Thread Leandro Lupori via cfe-commits
@@ -3391,7 +3391,10 @@ def fno_openmp : Flag<["-"], "fno-openmp">, Group, def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group, Flags<[NoArgumentUnused]>, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, - HelpText<"Set OpenMP version (e.g. 45

[clang] [clang-tools-extra] [flang] [lld] [llvm] [flang][clang] Add Visibility specific help text for options (PR #81869)

2024-02-16 Thread Leandro Lupori via cfe-commits
https://github.com/luporl edited https://github.com/llvm/llvm-project/pull/81869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-02-05 Thread Leandro Lupori via cfe-commits
luporl wrote: https://github.com/llvm/llvm-project/issues/80728 opened to track this issue. https://github.com/llvm/llvm-project/pull/77365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-30 Thread Leandro Lupori via cfe-commits
luporl wrote: It looks like `--sysroot=` is already supported by flang-new. It worked fine in my tests. Just like clang, it doesn't show up in `--help` or `--help-hidden`, for some reason I'm not aware. I noticed, however, that using `--sysroot` doesn't work: `flang-new: error: unknown

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-17 Thread Leandro Lupori via cfe-commits
luporl wrote: > > Apart from that, the other difference that I'm aware is that on non-Darwin > > targets -isysroot only sets the sysroot for the includes, while -sysroot > > also affects the libraries. > > Sounds like in practice it wouldn’t make much difference whether it’s > -isysroot or

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-16 Thread Leandro Lupori via cfe-commits
luporl wrote: > > As for the `isysroot.f90` test, I guess it would need to be removed, unless > > there is some way to run it only when `DEFAULT_SYSROOT` is not set. > > You could also use `DEFAULT_SYSROOT` to define a LIT "feature" and check for > that (via e.g. `REQUIRES`) in the test file.

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-15 Thread Leandro Lupori via cfe-commits
luporl wrote: > > If the compiler is built with `DEFAULT_SYSROOT`, the `-isysroot` option is > > ignored. Is that the expected behavior? My local MacOS build (with > > `-DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)"`) has `isysroot.f90` failed. > > I expected `-isysroot` to override

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-15 Thread Leandro Lupori via cfe-commits
luporl wrote: > If the compiler is built with `DEFAULT_SYSROOT`, the `-isysroot` option is > ignored. Is that the expected behavior? My local MacOS build (with > `-DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)"`) has `isysroot.f90` failed. I expected `-isysroot` to override `DEFAULT_SYSROOT`.

[flang] [clang] [flang][Driver] Support -pthread in the frontend (PR #77360)

2024-01-12 Thread Leandro Lupori via cfe-commits
luporl wrote: > Could someone test this on AArch64 and/or Windows just to make sure that it > passes there? Works fine on AArch64. https://github.com/llvm/llvm-project/pull/77360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [flang] [flang] Fix fveclib on Darwin (PR #77605)

2024-01-11 Thread Leandro Lupori via cfe-commits
https://github.com/luporl closed https://github.com/llvm/llvm-project/pull/77605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Fix fveclib on Darwin (PR #77605)

2024-01-11 Thread Leandro Lupori via cfe-commits
luporl wrote: Thanks for the reviews! https://github.com/llvm/llvm-project/pull/77605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-11 Thread Leandro Lupori via cfe-commits
https://github.com/luporl closed https://github.com/llvm/llvm-project/pull/77365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang] Fix fveclib on Darwin (PR #77605)

2024-01-10 Thread Leandro Lupori via cfe-commits
https://github.com/luporl updated https://github.com/llvm/llvm-project/pull/77605 >From 3e165d363b6211e4625056671d548037533ed819 Mon Sep 17 00:00:00 2001 From: Leandro Lupori Date: Wed, 10 Jan 2024 10:24:52 -0300 Subject: [PATCH 1/2] [flang] Fix fveclib on Darwin Fixes fveclib.f90 and

[clang] [flang] Fix fveclib on Darwin (PR #77605)

2024-01-10 Thread Leandro Lupori via cfe-commits
https://github.com/luporl created https://github.com/llvm/llvm-project/pull/77605 Fixes fveclib.f90 and fveclib-codegen.f90 tests, that were failing on Darwin. >From 3e165d363b6211e4625056671d548037533ed819 Mon Sep 17 00:00:00 2001 From: Leandro Lupori Date: Wed, 10 Jan 2024 10:24:52 -0300

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-10 Thread Leandro Lupori via cfe-commits
luporl wrote: I guess I was so focused on testing executables on Darwin that I forgot this test also applies to other targets. Let's hope it doesn't introduce a failure on any target. https://github.com/llvm/llvm-project/pull/77365

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-10 Thread Leandro Lupori via cfe-commits
luporl wrote: Thanks for the review and all the suggestions! https://github.com/llvm/llvm-project/pull/77365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-10 Thread Leandro Lupori via cfe-commits
https://github.com/luporl updated https://github.com/llvm/llvm-project/pull/77365 >From 01a2a8d315af2edb9fe3f0c9b57b5c74935521f1 Mon Sep 17 00:00:00 2001 From: Leandro Lupori Date: Mon, 8 Jan 2024 16:37:54 -0300 Subject: [PATCH 1/7] [flang][driver] Add support for -isysroot in the frontend If

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-09 Thread Leandro Lupori via cfe-commits
https://github.com/luporl updated https://github.com/llvm/llvm-project/pull/77365 >From 01a2a8d315af2edb9fe3f0c9b57b5c74935521f1 Mon Sep 17 00:00:00 2001 From: Leandro Lupori Date: Mon, 8 Jan 2024 16:37:54 -0300 Subject: [PATCH 1/6] [flang][driver] Add support for -isysroot in the frontend If

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-09 Thread Leandro Lupori via cfe-commits
@@ -0,0 +1,12 @@ +! Verify that the -isysroot flag is known to the frontend and, on Darwin, +! is passed on to the linker. + +! RUN: %flang -### --target=aarch64-apple-darwin -isysroot /path/to/sysroot \ +! RUN:%s 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN +! RUN:

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-09 Thread Leandro Lupori via cfe-commits
https://github.com/luporl updated https://github.com/llvm/llvm-project/pull/77365 >From 01a2a8d315af2edb9fe3f0c9b57b5c74935521f1 Mon Sep 17 00:00:00 2001 From: Leandro Lupori Date: Mon, 8 Jan 2024 16:37:54 -0300 Subject: [PATCH 1/5] [flang][driver] Add support for -isysroot in the frontend If

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-09 Thread Leandro Lupori via cfe-commits
@@ -220,6 +220,13 @@ static or shared library, the generated library does not need a `main` function, as a final link stage will occur that will provide the `Fortran_main` library when creating the final executable. +On Darwin, the logical root where the system libraries are

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-09 Thread Leandro Lupori via cfe-commits
https://github.com/luporl updated https://github.com/llvm/llvm-project/pull/77365 >From 01a2a8d315af2edb9fe3f0c9b57b5c74935521f1 Mon Sep 17 00:00:00 2001 From: Leandro Lupori Date: Mon, 8 Jan 2024 16:37:54 -0300 Subject: [PATCH 1/4] [flang][driver] Add support for -isysroot in the frontend If

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-09 Thread Leandro Lupori via cfe-commits
@@ -0,0 +1,12 @@ +! Verify that the -isysroot flag is known to the frontend and, on Darwin, +! is passed on to the linker. + +! RUN: %flang -### --target=aarch64-apple-darwin -isysroot /path/to/sysroot \ +! RUN:%s 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN +! RUN:

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-09 Thread Leandro Lupori via cfe-commits
https://github.com/luporl updated https://github.com/llvm/llvm-project/pull/77365 >From 01a2a8d315af2edb9fe3f0c9b57b5c74935521f1 Mon Sep 17 00:00:00 2001 From: Leandro Lupori Date: Mon, 8 Jan 2024 16:37:54 -0300 Subject: [PATCH 1/3] [flang][driver] Add support for -isysroot in the frontend If

[clang] [flang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-01-08 Thread Leandro Lupori via cfe-commits
https://github.com/luporl created https://github.com/llvm/llvm-project/pull/77365 If DEFAULT_SYSROOT is not specfied when building flang, then the -isysroot flag is needed to link binaries against system libraries on Darwin. It's also needed when linking against a non-default sysroot. >From

[flang] [clang] [flang][driver] Don't use -whole-archive on Darwin (PR #75393)

2023-12-14 Thread Leandro Lupori via cfe-commits
luporl wrote: Ok, thanks, I'll try with `-DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)"`. But it's good to know that using `-isysroot` with flang is the right solution. I'll try to come up with a patch to make flang support it, when I have some spare time.

[clang] [flang][driver] Don't use -whole-archive on Darwin (PR #75393)

2023-12-14 Thread Leandro Lupori via cfe-commits
luporl wrote: > I build and `check-flang` on `arm64-apple-darwin22.6.0`. > `Driver/no-duplicate-main.f90` fails in the 3rd RUN. The test passes with > HEAD. > > ``` > kelvin@neutrino2 build % /Users/kelvin/wrk/llvm/tmp/build/bin/flang-new -o >

[clang] [flang][driver] Don't use -whole-archive on Darwin (PR #75393)

2023-12-14 Thread Leandro Lupori via cfe-commits
luporl wrote: Some sources (https://stackoverflow.com/questions/16082470/osx-how-do-i-convert-a-static-library-to-a-dynamic-one) suggest the use of `-force_load`: ``` -force_load path_to_archive Loads all members of the specified static archive library. Note: -all_load

[clang] [flang][driver] Don't use -whole-archive on Darwin (PR #75393)

2023-12-14 Thread Leandro Lupori via cfe-commits
luporl wrote: I've run `flang/test/Driver/no-duplicate-main.f90` manually on Darwin and noticed that the third RUN line fails, because no error happens: `! RUN: not %flang -o %t.exe %t %t.c-object 2>&1` So maybe `-whole-archive` is just not needed on it?

[clang] [flang][driver] Don't use -whole-archive on Darwin (PR #75393)

2023-12-14 Thread Leandro Lupori via cfe-commits
https://github.com/luporl approved this pull request. LGTM. Worked fine on my machine. NOTE: tested by replacing `CommonArgs.cpp` in main, to avoid conflicts. https://github.com/llvm/llvm-project/pull/75393 ___ cfe-commits mailing list

[flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)

2023-12-13 Thread Leandro Lupori via cfe-commits
luporl wrote: Since this patch I can't build binaries with flang-new on macOS anymore: ``` $ /Users/leandro.lupori/git/flang-luporl/buildr/bin/flang-new -v -fopenmp -o stest.exe stest.o -L/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib flang-new version 18.0.0git

[clang] [flang][Driver] Support -rpath, -shared, and -static in the frontend (PR #66702)

2023-10-17 Thread Leandro Lupori via cfe-commits
@@ -50,3 +50,12 @@ ! MSVC-SAME: FortranDecimal.lib ! MSVC-SAME: /subsystem:console ! MSVC-SAME: "[[object_file]]" + +! Verify that certain linker flags are known to the frontend and are passed on +! to the linker. + +! RUN: %flang -### -rpath /path/to/dir -shared -static %s

[clang] [flang][Driver] Support -rpath, -shared, and -static in the frontend (PR #66702)

2023-10-17 Thread Leandro Lupori via cfe-commits
luporl wrote: Adding `--target=x86_64-linux-gnu`, as @MaskRay suggests, fixes the test on Windows. But then we are not actually testing linking on Windows. On my Windows machine, the test output is practically the same as that reported by buildkite, as mentioned by @tarunprabhu above. I see

[clang] [flang][Driver] Support -rpath, -shared, and -static in the frontend (PR #66702)

2023-10-16 Thread Leandro Lupori via cfe-commits
luporl wrote: I'll try to test this patch on a Windows on ARM machine. But it may take some time to setup and build flang on it. https://github.com/llvm/llvm-project/pull/66702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org