Skip to content
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

sqlite3.go: remove -DSQLITE_DISABLE_INTRINSIC: better builds #878

Merged
merged 1 commit into from Nov 16, 2020

Conversation

evanj
Copy link
Contributor

@evanj evanj commented Nov 13, 2020

This "disables the use of compiler-specific built-in functions such
as __builtin_bswap32()" (from the SQLite docs) so this change might
produce slightly better code. My primary motivation, however, is that
the "default" configuration for SQLite, which is widely tested, does
not set this preprocessor macro.

From looking at Github issues, it appears this was added to avoid a
build error on Mac OS X 10.11, in 2017:
#386

There have been a number of changes to sqlite3 since then.
I found a machine running Mac OS X 10.11.6. It was able to build and
run the tests in this package with this change.

Mac OS X 10.11 is has not been supported by Apple since 2018
(currently Apple is releasing updates for Mac OS 10.13 and newer; 11
is the current release). However, Go 1.14 is supported, and it
requires Mac OS X 10.11 or newer: https://golang.org/doc/go1.14
Go 1.15 only supports Mac OS 10.12 and newer:
https://golang.org/doc/go1.15

This "disables the use of compiler-specific built-in functions such
as __builtin_bswap32()" (from the SQLite docs) so this change might
produce slightly better code. My primary motivation, however, is that
the "default" configuration for SQLite, which is widely tested, does
not set this preprocessor macro.

From looking at Github issues, it appears this was added to avoid a
build error on Mac OS X 10.11, in 2017:
mattn#386

There have been a number of changes to sqlite3 since we tried this
last. I think it would be worth trying to remove this setting again.
I found a machine running Mac OS X 10.11.6. It was able to build and
run the tests in this package with this change.

Mac OS X 10.11 is has not been supported by Apple since 2018
(currently Apple is releasing updates for Mac OS 10.13 and newer; 11
is the current release). However, Go 1.14 is supported, and it
requires Mac OS X 10.11 or newer: https://golang.org/doc/go1.14
Go 1.15 only supports Mac OS 10.12 and newer:
https://golang.org/doc/go1.15
@mattn
Copy link
Owner

mattn commented Nov 16, 2020

Good to hear.

I found a machine running Mac OS X 10.11.6. It was able to build and
run the tests in this package with this change.

Thank you.

@mattn mattn merged commit 8e02107 into mattn:master Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants