Project

General

Profile

Actions

Bug #18079

open

[PATCH] make error for MinGW with Clang/LLVM + LLD

Added by xtkoba (Tee KOBAYASHI) 9 months ago. Updated 6 months ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 3.1.0dev (2021-08-16T00:07:09Z master 4cc44bd819) [x64-mingw32]
[ruby-core:104936]

Description

building spec/ruby/optional/capi/ext/array_spec.so
lld-link: error: x64-ucrt-ruby310.dll: bad file type. Did you specify a DLL instead of an import library?
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [../defs/gmake.mk:406: spec/ruby/optional/capi/ext/array_spec.so] Error 1

Proposed patch:

--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -403,7 +403,7 @@
 $(RUBYSPEC_CAPIEXT)/%.$(DLEXT): $(srcdir)/$(RUBYSPEC_CAPIEXT)/%.c $(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h $(RUBY_H_INCLUDES) $(LIBRUBY_SO)
 	$(ECHO) building $@
 	$(Q) $(MAKEDIRS) $(@D)
-	$(Q) $(DLDSHARED) $(XDLDFLAGS) $(XLDFLAGS) $(ARCH_FLAG) $(ARCH_FLAG) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBY_SO)
+	$(Q) $(DLDSHARED) $(XDLDFLAGS) $(XLDFLAGS) $(ARCH_FLAG) $(ARCH_FLAG) $(CFLAGS) $(INCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ $< $(LIBRUBY)
 	$(Q) $(RMALL) $@.*
 
 rubyspec-capiext: $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildcard $(srcdir)/$(RUBYSPEC_CAPIEXT)/*.c)))

Updated by xtkoba (Tee KOBAYASHI) 6 months ago

This no longer happens, presumably fixed by be9cc6c75865b24652d001f0f34f2e63180418c6. Thanks!

Actions

Also available in: Atom PDF