[LLVMbugs] [Bug 2237] request: add '-emit-llvm' switch to 'gnatmake'

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Apr 21 11:55:11 CDT 2008


Duncan Sands <baldrick at free.fr> changed:

           What    |Removed                     |Added
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Duncan Sands <baldrick at free.fr>  2008-04-21 11:55:08 ---
Fixed here:


Things are not perfect though: -emit-llvm is not recorded in the ali file.
The reason for this is that gnatmake passes an invisible -gnatez argument
to the compiler to indicate the end of the arguments that should be placed
in the ali file.  So gcc gets invoked something like this:
  gcc -emit-llvm -gnatez -c file.adb
However gcc rewrites -emit-llvm into -emit-llvm-bc if used with -c.
Actually what it apparently does is turn the -c into -emit-llvm-bc.
This gives
  gcc -gnatez -emit-llvm-bc file.adb
Since -emit-llvm-bc is now after the -gnatez, it is no longer placed
in the ali file.

This means (for example) that gnatlink will not use -emit-llvm when
compiling the binder generated main; and that gnatmake -s will always
think there is a switch mismatch and recompile every time.

These issues should probably get their own bugreport.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the LLVMbugs mailing list