On Mon, Sep 17, 2018 at 1:38 PM Rene Rivera <grafikrobot@gmail.com> wrote:
On Mon, Sep 17, 2018 at 3:31 PM Tony V E <tvaneerd@gmail.com> wrote:
Also, if you give me a function called std::compile(), that compiles code, it seems I can now write a compiler?

int main(int argc, char ** argv)
{
    return std::compile(argc, argv);
}

Wow, that was easy.
Can the paper explain what I'm misunderstanding? (Or maybe it does explain, but I missed it)

That's a correct understanding. And that's the one example I use in my implementation <https://github.com/bfgroup/std_cpp/blob/master/example/std_cpp.cpp>. I do try and explain the goals in the paper. In that it serves a dual purpose. But mainly it's a way to standardize the compiler options.

Right, otherwise you'd have to do:

int main(int argc, char** argv) {
    std::system((std::string("clang ") + argv[1]).c_str());
    return 0;
}

;-)

More seriously, the selection of compiler options you've chosen seem semi-random. It would be useful to have a survey of existing compilers and their options, and some criteria to determine which should be supported here and which shouldn't.

Further, what's the expectation of the result of calling this function? Can I actually execute any code? How? Can you make sure that you take into account the restrictions various platforms have, such as requiring code authentication. It goes way beyond linkers.

system seems like a precedent for what you suggest, and in my experience system isn't a precedent people want us to repeat.

 
On Mon, Sep 17, 2018 at 4:26 PM Tony V E <tvaneerd@gmail.com> wrote:
Yes, examples that use the function.

Any proposal for a function should include examples calling that function.

I see that this isn't a normal function, but it would still help. Maybe even more.


On Mon, Sep 17, 2018 at 4:22 PM Rene Rivera <grafikrobot@gmail.com> wrote:
What specific example are you looking for? There are various use cases <https://rawgit.com/bfgroup/std_cpp/master/doc/std_compile_Dxxxx_R0.html#_use_cases> mentioned. Some of those have specific examples. Maybe you mean an example program that uses the function? 

On Mon, Sep 17, 2018 at 3:17 PM Tony V E <tvaneerd@gmail.com> wrote:
Could you include an example (more than one, actually) in your paper?

Can (practically) all papers please include examples, everyone?

On Mon, Sep 17, 2018 at 10:06 AM Rene Rivera <grafikrobot@gmail.com> wrote:
This is the second of two papers I would like SG15 to consider for the next meeting.


This paper is a concrete proposal for one aspect of the Package Ecosystem Plan. It proposes to add an interface for transforming C++ source into usable executable programs. As such it aims to provide a common definition of compiler frontend tool options for transforming source code to translation units and linking those into executable programs.

There is also a sample vendor specification to go along with it:


There is a growing implementation (it grows as I add options to the paper) here:


I am looking for feedback, and collaboration, to hone the paper and implementation ahead of the meeting.

Note: I was hoping to post this with an actual paper number. But Hal hasn't been responding to emails this past week.


--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net

_______________________________________________
Tooling mailing list
Tooling@isocpp.open-std.org
http://www.open-std.org/mailman/listinfo/tooling


--
Be seeing you,
Tony
_______________________________________________
Tooling mailing list
Tooling@isocpp.open-std.org
http://www.open-std.org/mailman/listinfo/tooling


--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net

_______________________________________________
Tooling mailing list
Tooling@isocpp.open-std.org
http://www.open-std.org/mailman/listinfo/tooling


--
Be seeing you,
Tony


--
Be seeing you,
Tony
_______________________________________________
Tooling mailing list
Tooling@isocpp.open-std.org
http://www.open-std.org/mailman/listinfo/tooling


--
-- Rene Rivera
-- Grafik - Don't Assume Anything
-- Robot Dreams - http://robot-dreams.net

_______________________________________________
Tooling mailing list
Tooling@isocpp.open-std.org
http://www.open-std.org/mailman/listinfo/tooling