From: GitHub <no...@gi...> - 2013-05-24 12:25:05
|
Branch: refs/heads/master Home: https://github.com/MLton/mlton Commit: 98358a4eb6a9d1e2357c32e87fb4f3eea978ef62 https://github.com/MLton/mlton/commit/98358a4eb6a9d1e2357c32e87fb4f3eea978ef62 Author: Matthew Fluet <mat...@gm...> Date: 2013-05-23 (Thu, 23 May 2013) Changed paths: M mlton/main/main.fun Log Message: ----------- Generated .c, .s, and .o files should adopt non-.exe suffixes of explicit '-output' argument. Commits 33d587f and 5b12083 (SVN r6992 and r7143) arranged for generated .c, .s, and .o files that were kept to be named in accordance with the '-output' argument; in particular, if the '-output' argument directed the final executable to a directory other than the current directory, then generated .c, .s, and .o files that were kept would be created in the '-output' argument directory. However, the suffix of the '-output' argument was stripped to form the basename for generated .c, .s, and .o files. The motivating example in commit 33d587f (SVN r6992) was "-output bar/foo.exe", where it is reasonable to strip the .exe extension and generate "bar/foo.0.c", "bar/foo.1.s", etc. Unfortunately, this approach could lead to name conflicts: mlton -output foo.1 -keep g foo.1.sml and mlton -output foo.2 -keep g foo.2.sml Both commands would generate "foo.0.c", "foo.1.s", etc. In particular, these name conflicts arise when the 'bin/regression' script is used for cross compiling (where "mlton -target $crossTarget -stop g -output $f" is used to perform the SML compilation on the host machine, while "gcc $f.[0-9].[csS]" is used to perform the C/assembly compilation on the target machine). Finally, the behavior is somewhat confusing, as mlton -keep g foo.1.sml and mlton -keep g foo.2.sml would generate "foo.1.0.c", "foo.1.1.s", etc. and "foo.2.0.c", "foo.2.1.s", etc. This commit addresses the issue by only stripping .exe extensions from the '-output' argument for use as the basename for generated .c, .s, and .o files. Fixes #15. Commit: c73dc795336b15a755aacee23d5c802ce18f6f1c https://github.com/MLton/mlton/commit/c73dc795336b15a755aacee23d5c802ce18f6f1c Author: Matthew Fluet <mat...@gm...> Date: 2013-05-24 (Fri, 24 May 2013) Changed paths: M mlton/main/main.fun Log Message: ----------- Merge pull request #17 from MatthewFluet/output-suffix-w-keep Generated .c, .s, and .o files should adopt non-.exe suffixes of explicit '-output' argument. Compare: https://github.com/MLton/mlton/compare/1eb6f4abb3bd...c73dc795336b ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ MLton-commit mailing list MLt...@li...; mlt...@ml... https://lists.sourceforge.net/lists/listinfo/mlton-commit |