Skip to content
Browse files

lljvm-cc: take -classname into account when generating script

  • Loading branch information...
1 parent f3ab2fa commit 3a632597b967aac71c108af6a816b9b605c18f03 @davidar davidar committed Dec 23, 2009
Showing with 5 additions and 3 deletions.
  1. +5 −3 lljvm-cc
View
8 lljvm-cc
@@ -198,10 +198,12 @@ def bc2class(output, flags):
os.unlink(output + '.j')
if '-link-as-library' not in flags:
+ classname = os.path.basename(output).replace('.', '_')
+ for flag in flags:
+ if flag.startswith('-classname='):
+ classname = flag[len('-classname='):]
script = open(output, 'w')
- script.write(script_template \
- % (':'.join(classpath),
- os.path.basename(output).replace('.', '_')))
+ script.write(script_template % (':'.join(classpath), classname))
script.close()
os.chmod(output, 0755)

0 comments on commit 3a63259

Please sign in to comment.
Something went wrong with that request. Please try again.