-
Notifications
You must be signed in to change notification settings - Fork 460
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
fix llvm-ar as archiver for msvc targets; fix clang-cl detection; fix assembler output flag detection; add clang/clang-cl windows CI #1015
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
829e054
fix llvm-ar as archiver for msvc targets
russelltg 094d406
fix usage of get_command
russelltg d388cb8
fmt
russelltg d737de1
initial attempt at clang windows CI
russelltg 9eff753
apply suggestion
russelltg 7c20d23
hopefully get clang in path
russelltg 3da03c7
oops this is powershell
russelltg 0571f2a
use -? to detect cl-style frontends
russelltg 4581b26
use output flag directly for assembler type
russelltg c5c7562
apply ci suggestion
russelltg ea91a79
add windows clang-cl ci
russelltg 0ec9ca3
remove duplicate env
russelltg d44e733
make sure output arg is in same arg
russelltg 8b7ed60
fix creation of output arg
russelltg e022679
use msvc-style args for msvc
russelltg 4c5260a
hopefully fix env
russelltg 9d35dcd
add test env command
russelltg ba42c16
go back to previous env method
russelltg d69c416
maybe?
russelltg 975a9d7
FIx CI
NobodyXu 6237e2e
Re-enable warnings-as-error when compiling tests
NobodyXu f573a66
Fix `create_compile_object_cmd`
NobodyXu 6e72ff5
Fix `is_flag_supported` and `create_compile_object_cmd`
NobodyXu ad8d072
another ci attempt
russelltg 940bc3e
generalize NMakefile to allow clang flags
russelltg 2c41d81
fmt
russelltg ff0f7af
try re-adding devenv
russelltg fe5ae81
fix env vars in commandline tests
russelltg fd6b59a
apparently clang-cl doesn't accept -Fo:
russelltg 80a2f81
better check for if compiler is clang
russelltg 006ac81
fix clang not being detected as clang
russelltg eed65b4
fix typo, minor cleanup
russelltg 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 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
This file contains 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
This file contains 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,14 +1,20 @@ | ||
all: $(OUT_DIR)/msvc.lib $(OUT_DIR)/msvc.exe | ||
|
||
!IF "$(CC_FRONTEND)" == "MSVC" | ||
EXTRA_CFLAGS=-nologo | ||
CFLAG_OUTPUT=-Fo | ||
!ELSE | ||
CFLAG_OUTPUT=-o | ||
!ENDIF | ||
|
||
$(OUT_DIR)/msvc.lib: $(OUT_DIR)/msvc.o | ||
lib -nologo -out:$(OUT_DIR)/msvc.lib $(OUT_DIR)/msvc.o | ||
rc -h | ||
|
||
$(OUT_DIR)/msvc.o: src/msvc.c | ||
$(CC) -nologo -c -Fo:$@ src/msvc.c -MD | ||
$(CC) $(EXTRA_CFLAGS) -c $(CFLAG_OUTPUT)$@ src/msvc.c -MD | ||
|
||
$(OUT_DIR)/msvc.exe: $(OUT_DIR)/msvc2.o | ||
$(CC) -nologo -Fo:$@ $(OUT_DIR)/msvc2.o | ||
$(CC) $(EXTRA_CFLAGS) $(CFLAG_OUTPUT)$@ $(OUT_DIR)/msvc2.o | ||
|
||
$(OUT_DIR)/msvc2.o: src/msvc.c | ||
$(CC) -nologo -c -Fo:$@ src/msvc.c -DMAIN -MD | ||
$(CC) $(EXTRA_CFLAGS) -c $(CFLAG_OUTPUT)$@ src/msvc.c -DMAIN -MD |
This file contains 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 |
---|---|---|
|
@@ -385,17 +385,20 @@ for help)" | |
} | ||
} | ||
|
||
pub(crate) fn command_add_output_file( | ||
cmd: &mut Command, | ||
dst: &Path, | ||
cuda: bool, | ||
msvc: bool, | ||
clang: bool, | ||
gnu: bool, | ||
is_asm: bool, | ||
is_arm: bool, | ||
) { | ||
if msvc && !clang && !gnu && !cuda && !(is_asm && is_arm) { | ||
pub(crate) struct CmdAddOutputFileArgs { | ||
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. Thanks for this. |
||
pub(crate) cuda: bool, | ||
pub(crate) is_assembler_msvc: bool, | ||
pub(crate) msvc: bool, | ||
pub(crate) clang: bool, | ||
pub(crate) gnu: bool, | ||
pub(crate) is_asm: bool, | ||
pub(crate) is_arm: bool, | ||
} | ||
|
||
pub(crate) fn command_add_output_file(cmd: &mut Command, dst: &Path, args: CmdAddOutputFileArgs) { | ||
if args.is_assembler_msvc | ||
|| (args.msvc && !args.clang && !args.gnu && !args.cuda && !(args.is_asm && args.is_arm)) | ||
{ | ||
let mut s = OsString::from("-Fo"); | ||
s.push(dst); | ||
cmd.arg(s); | ||
|
This file contains 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 |
---|---|---|
|
@@ -5,7 +5,3 @@ | |
#ifdef __GNUC__ | ||
#pragma message "gcc" | ||
#endif | ||
|
||
#ifdef _MSC_VER | ||
#pragma message "msvc" | ||
#endif |
Oops, something went wrong.
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.
Well, if it works...