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

Tim Keith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 12 06:25:48 PST 2021


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 this work for an install? I think there the path would be `include/flang` rather than `tools/flang/include/flang`.
> You are probably right, I am giving the path w.r.t a build.  Can we make the assumption that there should be always an install?  Or do we determine if we flang-new is coming from build or install (by checking if a module file is present through ls)  and then set the path accordingly?
I think it should work in a build or an install. The `flang/tools/f18/flang` script checks for `include/flang` first and if that doesn't exist it uses `tools/flang/include/flang` so you could do the same. It would be good if we could fix the build or install so that the location is consistent.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97080/new/

https://reviews.llvm.org/D97080



More information about the cfe-commits mailing list