Hi all,
Will anyone object to (my) adding llvm-config error code check in
Makefile.rules? I had errors in target definition which called early
abort of llvm-config in Makefile. These went undetected and caused
tons of following errors in other modules (because llvm-config failed
to generate appropriate cmdline strings for g++).
- Yuri
Seems reasonable to me, depending on what the impact is.
-Chris
Hm, it turns out that only GNU make has $(error...). Does anyone know
how we can simulate it in generic make?
For GNU it's easy but ugly:
LlvmConfigResult := $(shell $(LLVM_CONFIG) --libs
$(LINK_COMPONENTS) || echo Error)
ifeq ($(LlvmConfigResult),Error)
$(error llvm-config failed)
endif
LLVMLibsOptions += $(LlvmConfigResult)
-Yuri
Yuri,
Hm, it turns out that only GNU make has $(error...). Does anyone know
how we can simulate it in generic make?
$(error) is implemented since 3.78. LLVM requires 3.79.
...Takumi
Ah, so LLVM already requires GNU make. Fine, than I'll submit the
patch in the evening.
- Yuri Gribov
Ok guys,
Here is the patch (I also had to update lib/CompilerDriver/Makefile
because it tries to run llvm-config without building it!).
I checked that build works and errors in llvm-config are properly
detected. Could someone verify and commit it? I do not have write
access to svn (how can I get one BTW?).
-Yuri Gribov
lib_CompilerDriver_Makefile.diff (710 Bytes)
Makefile.rules.diff (1.12 KB)
This works for me! Applied in r112714
To get commit access, please read the developer policy document and send me the requested info.
-Chris