Skip to content

Instantly share code, notes, and snippets.

@benley
Created June 21, 2017 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save benley/16527a2aa264bb7338eeb70e2b0fa9ca to your computer and use it in GitHub Desktop.
Save benley/16527a2aa264bb7338eeb70e2b0fa9ca to your computer and use it in GitHub Desktop.
bazel build jq
licenses(["notice"])
cc_binary(
name = "jq",
visibility = ["//visibility:public"],
srcs = glob([
"*.h",
"*.c",
]),
copts = [
"-std=gnu99",
"-Wextra",
"-Wall",
"-Wno-missing-field-initializers",
"-Wno-unused-variable", # Shows up if you build in opt mode
"-Wno-unused-parameter",
"-Wno-unused-function",
],
linkopts = [
"-ldl",
],
# All these defines can be reproduced by running configure and looking at
# confdefs.h at the end of config.log
defines = [
"STDC_HEADERS=1",
"HAVE_SYS_TYPES_H=1",
"HAVE_SYS_STAT_H=1",
"HAVE_STDLIB_H=1",
"HAVE_STRING_H=1",
"HAVE_MEMORY_H=1",
"HAVE_STRINGS_H=1",
"HAVE_INTTYPES_H=1",
"HAVE_STDINT_H=1",
"HAVE_UNISTD_H=1",
"HAVE_DLFCN_H=1",
"HAVE_MEMMEM=1",
"HAVE_MKSTEMP=1",
"HAVE_ALLOCA_H=1",
"HAVE_ALLOCA=1",
"HAVE_ISATTY=1",
"HAVE_STRPTIME=1",
"HAVE_STRFTIME=1",
"HAVE_TIMEGM=1",
"HAVE_GMTIME_R=1",
"HAVE_GMTIME=1",
"HAVE_GETTIMEOFDAY=1",
"HAVE_TM_TM_GMT_OFF=1",
"HAVE_ACOS=1",
"HAVE_ACOSH=1",
"HAVE_LIBM=1",
"HAVE_ASIN=1",
"HAVE_ASINH=1",
"HAVE_ATAN=1",
"HAVE_ATANH=1",
"HAVE_CBRT=1",
"HAVE_COS=1",
"HAVE_COSH=1",
"HAVE_EXP2=1",
"HAVE_EXP=1",
"HAVE_FLOOR=1",
"HAVE_J0=1",
"HAVE_J1=1",
"HAVE_LOG10=1",
"HAVE_LOG2=1",
"HAVE_LOG=1",
"HAVE_SIN=1",
"HAVE_SINH=1",
"HAVE_SQRT=1",
"HAVE_TAN=1",
"HAVE_TANH=1",
"HAVE_TGAMMA=1",
"HAVE_Y0=1",
"HAVE_Y1=1",
"HAVE_POW=1",
"HAVE_ATAN2=1",
"HAVE_HYPOT=1",
"HAVE_REMAINDER=1",
"HAVE___THREAD=1",
"IEEE_8087=1",
],
includes = ["."],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment