#206 Should Sun CC bid on .c++ files

open
Curt Arnold
cpptasks (103)
5
2007-05-13
2007-05-13
David Haney
No

This issue was originally raised in Bug 1715475:

The behavior of the Forte CC compiler changed with Forte 6.1 (Sunpro 5.2). Prior to Forte 6.1, the .c++ extension was not supported (and the compiler would reject it as an unknown file type). With 6.1 and later, the .c++ extension is supported. So should the Forte adapter bid on .c++ files (since they are currently supported) or not (since some compiler versions won't be able to handle them).

Initial response from carnold:

Maybe a half-hearted bid (something like DEFAULT_PROCESS_BID/2), so if no other compiler makes a full bid, then it will get a chance on the file. Better for a compiler that might be able to process it gets it than the linker (which gets all unbid files).

Discussion

  • David Haney
    David Haney
    2007-05-13

    Logged In: YES
    user_id=1140024
    Originator: YES

    Would it make sense to query the compiler version and use that to determine whether .c++ files should be bid on? For CC, we should be able to use "CC -V" in order to query the version. Once we have that, we could bid on .c++ if there version is greater than or equal to c5.2. That way the bid would be appropriate to the platform. Something similar could be used for bug 1690945 in order to decide which flags to use when invoking the cl.exe compiler.

    It looks like we already query the version for the gcc compiler, so there's some precedence for this approach. In other places however it looks we've avoided querying the compiler due to hangs, however I'm not sure off hand what would cause that.

    Querying the compiler does complicate testing, since any verification of this behavior would have to be executed on machines that have the compiler installed, and would have to tested against machines with different versions of the compiler installed.

    Another alternative would be to have separate enum for sunpro52. This was mentioned in 1690945 for addressing the msvc8 differences, and may be appropriate here.

    Version detection seems like the cleanest solution (if it works) for users, since they won't have to worry about what version of the compiler they have installed when setting up their ant configurations.