gollvm: emit func descriptors constant to cpugen.go
Update the cmake rules for generating cpugen.go to emit a definition
to control use of function descriptors. See gofrontend CL 162978 for
more info.
Change-Id: I0d335e8425d73fb9ac9bc28171851a9be2107f87
Reviewed-on: https://go-review.googlesource.com/c/164638
Reviewed-by: Cherry Zhang <cherryyz@google.com>
diff --git a/cmake/modules/AutoGenGo.cmake b/cmake/modules/AutoGenGo.cmake
index b5ea13f..741118ab 100644
--- a/cmake/modules/AutoGenGo.cmake
+++ b/cmake/modules/AutoGenGo.cmake
@@ -142,11 +142,14 @@
ERROR_VARIABLE errmsg
RESULT_VARIABLE exitstatus)
if(${exitstatus} MATCHES 0)
- file(APPEND ${outfile} "const CacheLinePadSize = ${result}")
+ file(APPEND ${outfile} "const CacheLinePadSize = ${result}\n")
else()
message(FATAL_ERROR "goarch.sh invocation failed: ${errmsg}")
endif()
- file(APPEND ${outfile} "\n\n")
+ # For now this is hard-wired off. If/when gollvm supports
+ # PPC64 ELF ABI v1 we'll need to configure it.
+ file(APPEND ${outfile} "const FunctionDescriptors = false\n")
+ file(APPEND ${outfile} "\n")
endfunction()