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

Can't build LDC in Release mode with MSVC #458

Closed
dymk opened this issue Aug 31, 2013 · 5 comments
Closed

Can't build LDC in Release mode with MSVC #458

dymk opened this issue Aug 31, 2013 · 5 comments
Labels

Comments

@dymk
Copy link

dymk commented Aug 31, 2013

Used cmake:

cmake -G "Visual Studio 10 Win64" -DCMAKE_INSTALL_PREFIX="G:/Programs/LDC" -DLLVM_ROOT_DIR="G:/Programs/LLVM-x64" -DLIBCONFIG++_INCLUDE_DIR="../libconfig-1.4.9/lib" -DLIBCONFIG++_LIBRARY="../libconfig-1.4.9/Release/libconfig++.lib" ../ldc

And then setting the configuration mode as release:

set Configuration=Release

Results in the error:

msbuild ALL_BUILD.vcxproj

       "C:\Users\Dylan\Code\D\ldc\build-ldc\ALL_BUILD.vcxproj" (default target)
        (1) ->
       "C:\Users\Dylan\Code\D\ldc\build-ldc\LDCShared.vcxproj" (default target)
        (2) ->
       (ClCompile target) ->
         cl : Command line error D8016: '/O2' and '/RTC1' command-line options
       are incompatible [C:\Users\Dylan\Code\D\ldc\build-ldc\LDCShared.vcxproj]

Solution: Open ALL_BUILD in MS visual studio, then set Runtime Checks (under Properties -> Configuration Properties -> Code Generation) to Default.

Only two subprojects in the solution need this done as far as I can tell: LDCShared and ldc2.

@dnadlinger
Copy link
Member

Should be as easy as not adding RTC1 in the CMake file for release builds, but I'll leave this to @redstar.

@redstar
Copy link
Member

redstar commented Sep 1, 2013

See also issue #353.

@dnadlinger
Copy link
Member

@redstar: Could you test this one? I unfortunately don't have a working MSVC install on my laptop, and I'm not at home right now.

@redstar
Copy link
Member

redstar commented Sep 1, 2013

Yes, I try to fix this.

redstar added a commit that referenced this issue Jan 12, 2014
@redstar
Copy link
Member

redstar commented Feb 4, 2014

Available in release 0.13.0-alpha1.

@redstar redstar closed this as completed Feb 4, 2014
redstar pushed a commit that referenced this issue Sep 27, 2014
lazily initalize TLS block on first access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants