From 90cbd612808b1ecd297d713f39db01b113c08b9a Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Fri, 15 Jan 2016 11:40:46 -0800 Subject: [PATCH] Adjust static library path on linux --- spec/helpers/test_languages.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/spec/helpers/test_languages.cc b/spec/helpers/test_languages.cc index 80c16789..f8ac6010 100644 --- a/spec/helpers/test_languages.cc +++ b/spec/helpers/test_languages.cc @@ -14,6 +14,14 @@ using std::istreambuf_iterator; map loaded_languages; int libcompiler_mtime = -1; +const char libcompiler_path[] = +#if defined(__linux) + "out/Debug/obj.target/libcompiler.a" +#else + "out/Debug/libcompiler.a" +#endif +; + static int get_modified_time(const string &path) { struct stat file_stat; int error = stat(path.c_str(), &file_stat); @@ -27,7 +35,7 @@ static int get_modified_time(const string &path) { const TSLanguage *get_test_language(const string &language_name) { if (libcompiler_mtime == -1) { - libcompiler_mtime = get_modified_time("out/Debug/libcompiler.a"); + libcompiler_mtime = get_modified_time(libcompiler_path); if (!libcompiler_mtime) { return nullptr; }