This repository was archived by the owner on Oct 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 411
Simplify Visual C configuration for -m64/-m32mscoff builds #960
Closed
+23
−13
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,4 +7,4 @@ druntime.json | |
| trace.def | ||
| trace.log | ||
| Makefile | ||
| /errno_c.obj | ||
| /errno_c*.obj | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,25 @@ | ||
| # Makefile to build D runtime library druntime64.lib for Win64 | ||
| # Makefile to build D runtime library druntime64.lib for Win64 or Win32/COFF | ||
|
|
||
| # To cross-compile 64-bit Druntime using 32-bit C++ compilers, run: | ||
| # make -f win64.mak VCBIN_SUBDIR=bin\x86_amd64 | ||
|
|
||
| # To build for Win32/COFF, run: | ||
| # make -f win64.mak MODEL=32mscoff VCBIN_SUBDIR=bin | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should use MODEL in the make file to set the VCBIN_SUBDIR.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, DM make cannot do that. |
||
|
|
||
| ## Memory model (32 or 64) | ||
| MODEL=64 | ||
|
|
||
| VCDIR=\Program Files (x86)\Microsoft Visual Studio 10.0\VC | ||
| SDKDIR=\Program Files (x86)\Microsoft SDKs\Windows\v7.0A | ||
| ## Visual C settings | ||
| VC=10 | ||
| VCDIR=$(ProgramFiles)\Microsoft Visual Studio $(VC).0\VC | ||
| VCBIN_SUBDIR=bin\amd64 | ||
| VCBIN_DIR=$(VCDIR)\$(VCBIN_SUBDIR) | ||
| CC="$(VCBIN_DIR)\cl" | ||
| #LD="$(VCBIN_DIR)\link" | ||
| #AR="$(VCBIN_DIR)\lib" | ||
|
|
||
| SDKDIR=$(ProgramFiles)\Microsoft SDKs\Windows\v7.0A | ||
| DMD=dmd | ||
|
|
||
| CC="$(VCDIR)\bin\amd64\cl" | ||
| LD="$(VCDIR)\bin\amd64\link" | ||
| AR="$(VCDIR)\bin\amd64\lib" | ||
| CP=cp | ||
|
|
||
| DOCDIR=doc | ||
|
|
@@ -40,9 +50,9 @@ $(mak\SRCS) | |
| # as both are used for debugging features (profiling and coverage) | ||
| # NOTE: a pre-compiled minit.obj has been provided in dmd for Win32 and | ||
| # minit.asm is not used by dmd for Linux | ||
|
|
||
| OBJS= errno_c.obj | ||
| OBJS_TO_DELETE= errno_c.obj | ||
| ERRNO_C_OBJ=errno_c$(MODEL).obj | ||
| OBJS= $(ERRNO_C_OBJ) | ||
| OBJS_TO_DELETE= $(ERRNO_C_OBJ) | ||
|
|
||
| ######################## Doc .html file generation ############################## | ||
|
|
||
|
|
@@ -637,8 +647,8 @@ $(IMPDIR)\etc\linux\memoryerror.d : src\etc\linux\memoryerror.d | |
|
|
||
| ################### C\ASM Targets ############################ | ||
|
|
||
| errno_c.obj : src\core\stdc\errno.c | ||
| $(CC) -c $(CFLAGS) src\core\stdc\errno.c -Foerrno_c.obj | ||
| $(ERRNO_C_OBJ) : src\core\stdc\errno.c | ||
| $(CC) -c $(CFLAGS) src\core\stdc\errno.c -Fo$(ERRNO_C_OBJ) | ||
|
|
||
| src\rt\minit.obj : src\rt\minit.asm | ||
| $(CC) -c $(CFLAGS) src\rt\minit.asm | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't this in the obj/ directory like everything else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What obj/ directory? The Windows makefile does not make any reference to such a directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, see line 3 of the gitignore file. I forgot windows was lame, again. Which opens the other obvious question, why ignore just this one .obj and not all .obj? This line just screams out "Why?"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well,
minit.objis versioned because it's hard to build or something...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minit.obj is in a subfolder where no other object files are generated to. "/*.obj" is non-recursive, but would include unittest.obj aswell.
In the long run, we should build into the /obj file hierarchy.