Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Windows (MSVC and mingw) build #6590

Closed
vicuna opened this issue Sep 29, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented Sep 29, 2014

Original bug ID: 6590
Reporter: chengang
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2014-10-06T13:39:24Z)
Resolution: fixed
Priority: normal
Severity: minor
Platform: Windows
OS: Windows
OS Version: 8
Version: 4.02.0+beta1 / +rc1
Target version: 4.02.1+dev
Fixed in version: 4.03.0+dev / +beta1
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Monitored by: @alainfrisch

Bug description

  1. In files config\Makefile{mingw,msvc}, we use

FLEXDIR=$(shell $(FLEXLINK) -where)

to invoke flexlink to find where it is, but this command is ran very time when flexlink's directory is referred. We only need to invoke flexlink once and get its locate.

So we can change above command to (note the colon):

FLEXDIR:=$(shell $(FLEXLINK) -where)

  1. MSVC has deprecated -Ox, -O2 (optimized for speed) is a better replacement.

File attachments

@vicuna

This comment has been minimized.

Copy link
Author

commented Oct 2, 2014

Comment author: @alainfrisch

Thanks! Your diff starts from "BYTECCCOMPOPTS=-Ox -MD", but "/Ox /MD" is currently used in the trunk. From which version did you create the diff?

@vicuna

This comment has been minimized.

Copy link
Author

commented Oct 2, 2014

Comment author: chengang

I reported another issue which changes /Ox /MD to -Ox -MD before
#6181

and it is committed to version 4.02 branch.

Is it possible to change merge that patch to trunk first, then commit this?

@vicuna

This comment has been minimized.

Copy link
Author

commented Oct 3, 2014

Comment author: @damiendoligez

Committed to 4.02 branch (rev 15461) and to trunk (along with the changes of #6181) (rev 15462).

Waiting for test results before I close this PR.

@vicuna

This comment has been minimized.

Copy link
Author

commented Oct 6, 2014

Comment author: @damiendoligez

Unfortunately, the change breaks the testsuite. Investigation reveals that:

-Ox is equivalent to -Ob2 -Og -Oi -Ot -Oy
-O2 is equivalent to -Ob2 -Og -Oi -Ot -Oy -Gs -GF -Gy

On our test machines, -Og -Gy breaks the tool-debugger tests, probably because of something related to dynamic linking.

I switched to -O2 -Gy- but only in trunk because this needs further testing. In the 4.02 branch I'm reverting to -Ox. (commits 15476 and 15477)

@vicuna vicuna closed this Oct 6, 2014

@vicuna vicuna added the ocamlbuild label Mar 14, 2019

@vicuna vicuna added this to the 4.02.1 milestone Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.