[libc] Remove direct math.h includes (#85324)
Reland of #84991 A downstream overlay mode user ran into issues with the isnan macro not working in our sources with a specific libc configuration. This patch replaces the last direct includes of math.h with our internal math_macros.h, along with the necessary build system changes.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=fuzzer")
|
||||
add_custom_target(libc-fuzzer)
|
||||
|
||||
add_subdirectory(math)
|
||||
# TODO(#85680): Re-enable math fuzzing after headers are sorted out
|
||||
# add_subdirectory(math)
|
||||
add_subdirectory(stdlib)
|
||||
add_subdirectory(stdio)
|
||||
add_subdirectory(string)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "src/__support/FPUtil/FPBits.h"
|
||||
|
||||
#include <math.h>
|
||||
#include "include/llvm-libc-macros/math-macros.h"
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
#define LLVM_LIBC_FUZZING_MATH_SINGLE_INPUT_SINGLE_OUTPUT_DIFF_H
|
||||
|
||||
#include "fuzzing/math/Compare.h"
|
||||
#include "src/__support/FPUtil/FPBits.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
#define LLVM_LIBC_FUZZING_MATH_TWO_INPUT_SINGLE_OUTPUT_DIFF_H
|
||||
|
||||
#include "fuzzing/math/Compare.h"
|
||||
#include "src/__support/FPUtil/FPBits.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "src/__support/FPUtil/FPBits.h"
|
||||
|
||||
#include <math.h>
|
||||
#include "include/llvm-libc-macros/math-macros.h"
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user