This is an archive of the discontinued LLVM Phabricator instance.

[Flang] Update build documentation
ClosedPublic

Authored by PeteSteinfeld on Aug 2 2022, 7:18 PM.

Details

Summary

Changes to build instructions based on the latest requirements with
compiler-rt.

Diff Detail

Event Timeline

PeteSteinfeld created this revision.Aug 2 2022, 7:18 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
PeteSteinfeld requested review of this revision.Aug 2 2022, 7:18 PM

Mostly being pedantic/nitpicking.

It looks like it's quite complicated, I'd prefer "as simple as possible" cmake commands.

flang/README.md
64–69

Stylistic nit-pick: Perhaps make this an impersonal ("don't use I")?

86–90

Nitpick: If you have done rm -rf on a directory, there's no point in using mkdir -p. [And technically, if you just created the directory, it shouldn't have a build or install directory in it, should it?]

Mostly confusing as there are places below that doesn't use -p

94

This seems unnecessary - assuming your system has a competent C and C++ compiler, cmake ought to pick it up by default.

96–102

Are all of these things required? It looks complicated to me - the command I use isn't trivial, but it's simpler than this [it also limits number of parallel links and a few things, to avoid running low on memory].

129–130

The text above says that clang must be used for compiler-rt?

136

Is compiler-rt incompatible with C++17? Keeping settings as similar as possible is helpful...

168

Should that be standalone?

tschuett added a subscriber: tschuett.EditedAug 3 2022, 7:47 AM

I would love to see a more precise target in the future.

> ninja install-flang

Another nice target would be:

> ninja install-flang-headers

Responding to Mats's comments.

@Leporacanthicus , thank you so much for your excellent feedback. Sorry for the delay in responding.

flang/README.md
64–69

Thanks. I'll change it.

86–90

Thanks. I'll change it.

94

It looks like you're correct. I'll get rid of them.

96–102

Yes, I've been able to simplify it. One thing that's not strictly necessary (but handy for debugging) is the -DCMAKE_EXPORT_COMPILE_COMMANDS=ON.

129–130

Good catch. I'll fix this.

136

Good question. I don't know the answer. But I do know that the commands in this document work. I'm not sure how to thoroughly test the results of changing the standard level, so I'm reluctant to change it.

168

In this case, the instructions say to cd to the subdirectory of standalone which is called llvm-project/flang. This directory was created by the git clone command.

@Leporacanthicus, do you require any further changes? If not, can you please approve?

This revision is now accepted and ready to land.Sep 9 2022, 3:00 AM
This revision was automatically updated to reflect the committed changes.