mirror of https://github.com/mpv-player/mpv
build: add -fno-math-errno
glibc/gcc make certain math functions set errno by default. This is not required by the standard, and makes everything complexer and slower (well done glibc). It typically prevents inlining certain math functions too, where the compiler can turn a function call to a single instruction, such as observed with lrint(). So this has possibly some minor performance advantages, and no disadvantages.
This commit is contained in:
parent
9dfcc496a5
commit
a1812e2a46
|
@ -44,6 +44,7 @@ def __add_generic_flags__(ctx):
|
|||
"-Wno-format-truncation",
|
||||
"-Wimplicit-fallthrough",
|
||||
])
|
||||
__test_and_add_flags__(ctx, ["-fno-math-errno"])
|
||||
|
||||
def __add_gcc_flags__(ctx):
|
||||
ctx.env.CFLAGS += ["-Wall", "-Wundef", "-Wmissing-prototypes", "-Wshadow",
|
||||
|
|
Loading…
Reference in New Issue