bblfsh / libuast

Apache License 2.0
20 stars 15 forks source link

Increase backward compatibility in macOS build #111

Closed ncordon closed 5 years ago

ncordon commented 5 years ago

The Makefile we currently use to do the releases compiles the library without setting a minimum first compatible version for macOS systems. This results in messages like the below one (when compiling in scala-client for example):

ld: warning: object file (src/main/resources/libuast/libuast.a(000000.o)) was built for newer OSX version (10.13) than being linked (10.7)

I think we should agree in a default min version for macOs builds. 10.7 seems the most reasonable one since it is the first to include stdlib and saves us from doing hacky things to compile (see https://github.com/bblfsh/scala-client/issues/87 for context).

It should be solved adding to the macOS build in Makefile the following flags:

CGO_CFLAGS=-mmacosx-version-min=10.7 CGO_LDFLAGS=-mmacosx-version-min=10.7