[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-06-24 Thread Michael Klemm via cfe-commits
mjklemm wrote: Yeah, go ahead and revert. I can create a new PR from it just print the resource dir. https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-06-24 Thread David Truby via cfe-commits
DavidTruby wrote: Hi @mjklemm, this appears to be breaking linking entirely on Windows, I'm not sure how it's taken us so long to notice... With the patch I get errors trying to find compiler-rt but without it I can build fine. I wonder why this patch _changed_ the resource directory, as well

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-14 Thread Michael Klemm via cfe-commits
mjklemm wrote: @tblah @banach-space Thanks for the reviews! https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-14 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm closed https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-13 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. Apologies for losing track of this, I was on holiday all of last week. This LGTM https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-13 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/90886 >From 1a994159025f127f0f7d11da80b74035788d52c9 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Thu, 2 May 2024 14:50:45 +0200 Subject: [PATCH 1/8] Enable -print-resource-dir also for Flang --- clang/include/

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-07 Thread Michael Klemm via cfe-commits
mjklemm wrote: @tblah Ping :-) https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
mjklemm wrote: > and for addressing my comments More than happy to! Still learning how to be a proper Flang developer, so I'm thankful for all the comments! https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lis

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Andrzej WarzyƄski via cfe-commits
https://github.com/banach-space approved this pull request. LGTM, thanks for working on this and for addressing my comments đŸ™đŸ» https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
mjklemm wrote: > Do you know the meaning for Classic Flang? The way `-print-resource-dir` now works should be consistent with how Classic Flang works. If that's not the right response, I guess I got my wires crossed and you need to explain it to me. :-) https://github.com/llvm/llvm-project/

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
@@ -5474,7 +5474,7 @@ def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">, Visibility<[ClangOption, CLOption]>; def print_resource_dir : Flag<["-", "--"], "print-resource-dir">, HelpText<"Print the resource directory pathname">, - Visibility<[ClangOption, CLO

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/90886 >From 1a994159025f127f0f7d11da80b74035788d52c9 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Thu, 2 May 2024 14:50:45 +0200 Subject: [PATCH 1/7] Enable -print-resource-dir also for Flang --- clang/include/

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Andrzej WarzyƄski via cfe-commits
banach-space wrote: > > How does this compare to GFortran and Classic Flang? Anything resembling > > this flag? > > GFortran does not have it, but Classic Flang does. So, it's closing a gap to > Classic Flang here as well. Do you know the meaning for Classic Flang? Would be great to make "LLV

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Andrzej WarzyƄski via cfe-commits
@@ -0,0 +1,3 @@ +! RUN: %flang -print-resource-dir -resource-dir=%S/Inputs/resource_dir \ +! RUN: | FileCheck -check-prefix=PRINT-RESOURCE-DIR -DFILE=%S/Inputs/resource_dir %s banach-space wrote: > So, my feeling is that this refactoring should take place in a

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Andrzej WarzyƄski via cfe-commits
@@ -5474,7 +5474,7 @@ def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">, Visibility<[ClangOption, CLOption]>; def print_resource_dir : Flag<["-", "--"], "print-resource-dir">, HelpText<"Print the resource directory pathname">, - Visibility<[ClangOption, CLO

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/90886 >From 1a994159025f127f0f7d11da80b74035788d52c9 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Thu, 2 May 2024 14:50:45 +0200 Subject: [PATCH 1/6] Enable -print-resource-dir also for Flang --- clang/include/

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
@@ -5474,7 +5474,7 @@ def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">, Visibility<[ClangOption, CLOption]>; def print_resource_dir : Flag<["-", "--"], "print-resource-dir">, HelpText<"Print the resource directory pathname">, - Visibility<[ClangOption, CLO

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm updated https://github.com/llvm/llvm-project/pull/90886 >From 1a994159025f127f0f7d11da80b74035788d52c9 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Thu, 2 May 2024 14:50:45 +0200 Subject: [PATCH 1/5] Enable -print-resource-dir also for Flang --- clang/include/

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
@@ -0,0 +1,3 @@ +! RUN: %flang -print-resource-dir -resource-dir=%S/Inputs/resource_dir \ +! RUN: | FileCheck -check-prefix=PRINT-RESOURCE-DIR -DFILE=%S/Inputs/resource_dir %s mjklemm wrote: I'll make the variable a bit clearer in the next update. That's a goo

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
@@ -0,0 +1,3 @@ +! RUN: %flang -print-resource-dir -resource-dir=%S/Inputs/resource_dir \ +! RUN: | FileCheck -check-prefix=PRINT-RESOURCE-DIR -DFILE=%S/Inputs/resource_dir %s +! PRINT-RESOURCE-DIR: [[FILE]] mjklemm wrote: It does not. The `/Inputs/resource_di

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Michael Klemm via cfe-commits
mjklemm wrote: > How does this compare to GFortran and Classic Flang? Anything resembling this > flag? GFortran does not have it, but Classic Flang does. So, it's closing a gap to Classic Flang here as well. https://github.com/llvm/llvm-project/pull/90886

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Andrzej WarzyƄski via cfe-commits
@@ -5474,7 +5474,7 @@ def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">, Visibility<[ClangOption, CLOption]>; def print_resource_dir : Flag<["-", "--"], "print-resource-dir">, HelpText<"Print the resource directory pathname">, - Visibility<[ClangOption, CLO

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Andrzej WarzyƄski via cfe-commits
@@ -0,0 +1,3 @@ +! RUN: %flang -print-resource-dir -resource-dir=%S/Inputs/resource_dir \ +! RUN: | FileCheck -check-prefix=PRINT-RESOURCE-DIR -DFILE=%S/Inputs/resource_dir %s +! PRINT-RESOURCE-DIR: [[FILE]] banach-space wrote: I have a suspicion that this woul

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Andrzej WarzyƄski via cfe-commits
@@ -0,0 +1,3 @@ +! RUN: %flang -print-resource-dir -resource-dir=%S/Inputs/resource_dir \ +! RUN: | FileCheck -check-prefix=PRINT-RESOURCE-DIR -DFILE=%S/Inputs/resource_dir %s banach-space wrote: You should be able to avoid repeating "%S/Inputs/resource_dir" if

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Andrzej WarzyƄski via cfe-commits
@@ -250,6 +247,25 @@ void Driver::setDriverMode(StringRef Value) { Diag(diag::err_drv_unsupported_option_argument) << OptName << Value; } +void Driver::setResourceDirectory() { + // Compute the path to the resource directory, depending on the driver mode. + switch (Mode)

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-03 Thread Andrzej WarzyƄski via cfe-commits
banach-space wrote: > > What's the definition of "resource dir" for Fortran? > > I'd like to at least have it point to where the MODULE files live. > > When I look at what clang emits, then Flang's resource directory should > rather point to the place, where Flang has its `lib` and `include`

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-02 Thread Michael Klemm via cfe-commits
mjklemm wrote: > What's the definition of "resource dir" for Fortran? I'd like to at least have it point to where the MODULE files live. When I look at what clang emits, then Flang's resource directory should rather point to the place, where Flang has its `lib` and `include` directories. So,

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-02 Thread Andrzej WarzyƄski via cfe-commits
https://github.com/banach-space commented: What's the definition of "resource dir" for Fortran? https://github.com/llvm/llvm-project/pull/90886 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-02 Thread Michael Klemm via cfe-commits
@@ -250,6 +247,25 @@ void Driver::setDriverMode(StringRef Value) { Diag(diag::err_drv_unsupported_option_argument) << OptName << Value; } +void Driver::setResourceDirectory() { + // Compute the path to the resource directory, depending on the driver mode. + switch (Mode)

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Michael Klemm (mjklemm) Changes This should be a NFC change for all drivers, but Flang. --- Full diff: https://github.com/llvm/llvm-project/pull/90886.diff 5 Files Affected: - (modified) clang/include/c

[clang] [flang] [Flang][Driver] Add -print-resource-dir command line flag to emit Flang's resource directory (PR #90886)

2024-05-02 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm created https://github.com/llvm/llvm-project/pull/90886 This should be a NFC change for all drivers, but Flang. >From 1a994159025f127f0f7d11da80b74035788d52c9 Mon Sep 17 00:00:00 2001 From: Michael Klemm Date: Thu, 2 May 2024 14:50:45 +0200 Subject: [PATCH 1/3] Enabl