[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-23 Thread Arnamoy B via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcd4abc5242c0: [flang][driver] Add -fintrinsic-modules-path option (authored by Arnamoy Bhattacharyya arnamoy.bhattachar...@huawei.com, committed by

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-23 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 332649. arnamoy10 added a comment. Addressing minor issues CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Flang.cpp

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-20 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. LGTM, thank you for working on this! In the summary you refer to `-fdebug-module-writer`. Could you please update before merging this? Comment at:

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:298 + driverPath.append("/../include/flang/"); + return driverPath.str().str(); +} awarzynski wrote: > Given this [[ >

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 331984. arnamoy10 added a comment. Addressing reviewers' comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Flang.cpp

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:298 + driverPath.append("/../include/flang/"); + return driverPath.str().str(); +} Given this [[

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:292 + std::string driverPath = llvm::sys::fs::getMainExecutable(nullptr, nullptr); + driverPath = driverPath.substr(0, driverPath.size() - 9); + return

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 331888. arnamoy10 added a comment. Using `llvm::sys::path::remove_filename` as per suggestion. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files: clang/include/clang/Driver/Options.td

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-19 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:292 + std::string driverPath = llvm::sys::fs::getMainExecutable(nullptr, nullptr); + driverPath = driverPath.substr(0, driverPath.size() - 9); + return

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-18 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:292 + std::string driverPath = llvm::sys::fs::getMainExecutable(nullptr, nullptr); + driverPath = driverPath.substr(0, driverPath.size() - 9); + return

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-18 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 331528. arnamoy10 added a comment. Fixing bug in test case CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Flang.cpp

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-16 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 330968. arnamoy10 added a comment. Adding the test file CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Flang.cpp

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-15 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 330785. arnamoy10 added a comment. Adding the dummy modules CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Flang.cpp

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-15 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 330711. arnamoy10 added a comment. Clang-formatting and addressing reviewers' comments: Moved the default directory append to `setFortranOpts()` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files:

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-15 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. I tried reproducing the CI failures reported at the top (in particular `intrinsic_module_path.f90`), but haven't had much luck. @arnamoy10 - how about you? Could you `clang-format` this patch when uploading the next diff? Thank you! Comment at:

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-13 Thread Bryan Chan via Phabricator via cfe-commits
bryanpkc added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:292 + std::string driverPath = llvm::sys::fs::getMainExecutable(nullptr, nullptr); + driverPath = driverPath.substr(0, driverPath.size() - 9); + return

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-12 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 330337. arnamoy10 edited the summary of this revision. arnamoy10 added a comment. Update the path based on the patch D98522 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-12 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:293 + driverPath = driverPath.substr(0, driverPath.size() - 9); + return driverPath.append("/../tools/flang/include/flang/"); +} tskeith wrote: > tskeith wrote: > >

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-12 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:293 + driverPath = driverPath.substr(0, driverPath.size() - 9); + return driverPath.append("/../tools/flang/include/flang/"); +} tskeith wrote: > arnamoy10 wrote: > > tskeith

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-12 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:293 + driverPath = driverPath.substr(0, driverPath.size() - 9); + return driverPath.append("/../tools/flang/include/flang/"); +} arnamoy10 wrote: > tskeith wrote: > > Does

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-11 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:293 + driverPath = driverPath.substr(0, driverPath.size() - 9); + return driverPath.append("/../tools/flang/include/flang/"); +} tskeith wrote: > Does this work for an

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-11 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:293 + driverPath = driverPath.substr(0, driverPath.size() - 9); + return driverPath.append("/../tools/flang/include/flang/"); +} Does this work for an install? I think there

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-11 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 330049. arnamoy10 added a comment. Modifying the algo of default search path extraction for supporting Windows platforms. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files:

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-11 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. Thank you for updating this @arnamoy10 ! Comment at: flang/lib/Frontend/CompilerInvocation.cpp:26 #include "llvm/Support/raw_ostream.h" + +#include "llvm/Support/FileSystem.h" Not needed Comment at:

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-11 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 329976. arnamoy10 added a comment. Clang-formatting CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Flang.cpp

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-11 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 329970. arnamoy10 added a comment. Herald added a subscriber: ormris. 1. Updated to set the default search directory for the intrinsic module 2. Modified the test case to check the prepend behavior CHANGES SINCE LAST ACTION

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-10 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 added a comment. Thank you so much for this experiment @awarzynski . I will modify the code accordingly. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 ___ cfe-commits mailing list

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-10 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D97080#2613628 , @awarzynski wrote: > **Question**: What are the semantics for this flag in `gfortran`? Is the path > specified with `-fintrinsics-module-path` _prepended_ or _appended_ to the > default search path? I

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-09 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D97080#2586289 , @arnamoy10 wrote: > Also, not sure what to set as the default directory, as gfortran uses a > specific installation location. We probably should use a location relative to the `flang-new` binary, i.e.

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-02-24 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 326234. arnamoy10 edited the summary of this revision. arnamoy10 added a comment. Addressing comments, by separating the search directories from `fintrinsic-modules-path` in a separate variables. Also added dummy modules for the test case, as using

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-02-22 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski requested changes to this revision. awarzynski added a comment. This revision now requires changes to proceed. Hi @arnamoy10 , thanks for the patch! Both `ieee_arithmetic.mod` and `iso_fortran_env.mod` look like copies of similar files from `/tools/flang/include/flang`. Could you

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-02-20 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 updated this revision to Diff 325208. arnamoy10 added a comment. Updating the test case to include `-fc1` as well CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97080/new/ https://reviews.llvm.org/D97080 Files: clang/include/clang/Driver/Options.td

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-02-19 Thread Arnamoy B via Phabricator via cfe-commits
arnamoy10 created this revision. arnamoy10 added reviewers: awarzynski, tskeith, sscalpone, clementval, AMDChirag, SouraVX. Herald added subscribers: jansvoboda11, dang, jfb. arnamoy10 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add